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

React 17 #652

Open
juanca opened this issue Dec 10, 2020 · 2 comments
Open

React 17 #652

juanca opened this issue Dec 10, 2020 · 2 comments

Comments

@juanca
Copy link

juanca commented Dec 10, 2020

Is your feature request related to a problem? Please describe.

I cannot upgrade to React 17 when using PivotalUI components in my codebase. Our test suite (which uses Enzyme) fails on components using PivotalUI components. e.g. OverlayTrigger

Note: there is a high likelihood that Enzyme just doesn't play well when there are varying React version in-play. But that's for another repo/issue.

Describe the solution you'd like

  1. Remove react from the dependencies list (it is already listed under peerDependencies)
  2. Add react to the devDependencies list (it is already listed under peerDependencies)
  3. Try out React 17 and (assuming it will pass) add ^17 to the react semver under peerDependencies

Describe alternatives you've considered

If it is broken, then that's all right. But I would highly encourage at least cleaning up dependencies <=> peerDependencies.

Additional context

@reidmit
Copy link
Contributor

reidmit commented Dec 10, 2020

Thanks for the issue! I agree that this makes sense, but unfortunately I'm not sure when we'll have time to prioritize this.

In the meantime, if you're using Yarn, I wonder if something like this would work (in your package.json):

  "resolutions": {
    "pivotal-ui/react": "16.8",
    "pivotal-ui/react-dom": "16.8",
    "pivotal-ui/pui-react-animation/react": "16.8"
  },

(using whichever version of React you'd like)

@juanca
Copy link
Author

juanca commented Dec 10, 2020

Everything seems to be working as expected with the resolutions. 👍 Thanks for the hotfix.

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

No branches or pull requests

2 participants