Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow React 17 peer dependency #4403

Merged
merged 2 commits into from
Nov 10, 2020
Merged

feat: allow React 17 peer dependency #4403

merged 2 commits into from
Nov 10, 2020

Conversation

adidahiya
Copy link
Contributor

Fixes #4391

Changes proposed in this pull request:

Allow React 17 as an NPM peer dependency for all packages.

Reviewers should focus on:

Despite Blueprint's usage of some legacy APIs (#4149, #3979, etc), React 17's breaking changes don't seem to affect our components, so I think it's ok to expand the allowed version ranges.

This PR does not change the repo to build with React 17 or test it out in CI workflows. If there are issues with React 17 compatibility in the future, we can flag those issues and work on resolving them incrementally.

Screenshot

Tested it out locally with a Yarn resolution set to 17.0.1:

image

@blueprint-bot
Copy link

Merge remote-tracking branch 'origin/develop' into ad/allow-react-17

Previews: documentation | landing | table

@adidahiya adidahiya merged commit 54bed17 into develop Nov 10, 2020
@adidahiya adidahiya deleted the ad/allow-react-17 branch November 10, 2020 16:04
@jasongrout
Copy link

FYI, there still is a dependency on react-popper ^1:

"react-popper": "^1.3.7",

react-popper 1 has a peer dependency on react 16, so installing @blueprintjs/core still ends up with a warning for react 17 from it.

react-popper ^2 now has updated to have a peer dependency allowing react 17: floating-ui/react-popper#390

@jasongrout
Copy link

jasongrout commented Jan 29, 2021

react-popper ^2 now has updated to have a peer dependency allowing react 17: popperjs/react-popper#390

It looks like #4488 upgrades to react-popper 2 (fixing #4023). Unfortunately, it seems that change will be released in an upcoming release, and doesn't fix the react 17 peer dependency compatibility problem with the current blueprint.

For those running into npm install errors with npm v7, installing with npm install --legacy-peer-deps lets the install proceed instead of erroring out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React 17 support
3 participants