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

deps: update peerDeps to support React 18 without warnings #89

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

agilgur5
Copy link
Owner

Summary

Update peerDependencies range to support React 18. Update devDeps, tests, example, to support / use React 18

Details

  • seems to work without any component modifications needed on React 18

  • ensure tests pass with React 18

    • update devDeps to React 18, react-dom 18, @types/react 18
    • update devDeps to RTL 13 which supports React 18

Next Steps

Backport this to v1.0.6, i.e. prior to the TypeScript rewrite (#42) being merged. I'll have to cherry-pick a number of commits to get that to work, but should hopefully get it working quickly.

  • update example to use createRoot instead of ReactDOM.render
    • this is one of the opt-ins to React 18 mode, and doesn't seem to change anything about the example (just no warnings anymore)

- seems to work without any component modifications needed on React 18
  - React 18 was mostly _deprecations_ and new features per the upgrade guide: https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html
  - React 18 has concurrent mode opt-in, which is technically breaking, but doesn't seem to effect this library (fortunately)

- ensure tests pass with React 18
  - update devDeps to React 18, react-dom 18, @types/react 18
  - update devDeps to RTL 13 which supports React 18
    - see previous commit for the migration from Enzyme to RTL since Enzyme never had official support for React 17, let alone React 18

- update example to use `createRoot` instead of `ReactDOM.render`
  - this is one of the opt-ins to React 18 mode, and doesn't seem to change anything about the example (just no warnings anymore)
@agilgur5 agilgur5 added kind: feature New feature or request kind: internal Changes only affect the internals and not the API or usage scope: dependencies Pull requests that update a dependency file scope: tests Tests could be improved. Or changes that only affect tests labels Jun 16, 2022
Copy link
Owner Author

@agilgur5 agilgur5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@agilgur5 agilgur5 merged commit 64c7c49 into main Jun 16, 2022
@agilgur5 agilgur5 deleted the deps-react-18 branch June 16, 2022 17:20
agilgur5 added a commit that referenced this pull request Jun 16, 2022
- seems to work without any component modifications needed on React 18
  - React 18 was mostly _deprecations_ and new features per the upgrade guide: https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html
  - React 18 has concurrent mode opt-in, which is technically breaking, but doesn't seem to effect this library (fortunately)

- ensure tests pass with React 18
  - update devDeps to React 18, react-dom 18, @types/react 18
  - update devDeps to RTL 13 which supports React 18
    - see previous commit for the migration from Enzyme to RTL since Enzyme never had official support for React 17, let alone React 18

- update example to use `createRoot` instead of `ReactDOM.render`
  - this is one of the opt-ins to React 18 mode, and doesn't seem to change anything about the example (just no warnings anymore)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature New feature or request kind: internal Changes only affect the internals and not the API or usage scope: dependencies Pull requests that update a dependency file scope: tests Tests could be improved. Or changes that only affect tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React 18 support in peerDeps
1 participant