mongodb-js / connect-backbone-to-react

Connect Backbone Models and Collections to React.
https://www.npmjs.com/package/connect-backbone-to-react
Apache License 2.0
27 stars 5 forks source link

Add support to React 17 #28

Closed guilhermemj closed 2 years ago

guilhermemj commented 2 years ago

Hello there! Just wanted to update some dependencies in order to use this library with React 17 (might as well do a similar PR for React 18 in the future).

The biggest changes are using @wojtekmaj/enzyme-adapter-react-17 in favor of enzyme-adapter-react-16 as there seems to be no official enzyme adapter for React 17 and that the package-lock.json was generated using npm v7 (all should be transparent to users).

hswolff commented 2 years ago

Thanks for the PR!

Is the issue the peerDependencies? I wonder if we can broaden the peerDeps and leave the code alone as we're not really using any newer React features.

  "peerDependencies": {
    "react": "^16.6.0-0 || ^17.0.0 || ^18.0.0"
  },
guilhermemj commented 2 years ago

Actually that would work too! Should I create another PR with your proposed changes or the maintainers will do it?

hswolff commented 2 years ago

I'll take care of it, plus push out a new version with that. Ty for the nudge!

hswolff commented 2 years ago

Done! https://github.com/mongodb-js/connect-backbone-to-react/commit/59562bbd6cd856834100c728de55ac5b1f688bc4

guilhermemj commented 2 years ago

Thank you very much!