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

Allow usage with react 18 #7377

Merged
merged 1 commit into from
Mar 10, 2022
Merged

Allow usage with react 18 #7377

merged 1 commit into from
Mar 10, 2022

Conversation

fzaninotto
Copy link
Member

  • Update dependencies to use react-18 (not in this PR)
  • Update the simple example to use createRoot and test that it works (not in this PR)
  • Update the ecommerce example to use createRoot and StrictMode and test that it works (not in this PR)
  • Relax react version dependency

@fzaninotto fzaninotto added the RFR Ready For Review label Mar 10, 2022
@fzaninotto fzaninotto added this to the 4.0.0-beta.3 milestone Mar 10, 2022
@fzaninotto fzaninotto mentioned this pull request Mar 10, 2022
@djhi djhi merged commit e4cdb19 into next Mar 10, 2022
@djhi djhi deleted the react-18-compatibility branch March 10, 2022 16:54
@stof
Copy link

stof commented Mar 16, 2022

is it expected to mark versions 1 to +INF as supported in the peerDependencies ? Previously, the code had a 16.9.0 lower bound so I doubt older versions work, and you only tested it with version 19, not with 19+

@fzaninotto
Copy link
Member Author

I must admit that I initially made the following change:

-"react": "^16.9.0 || ^17.0.0",
+"react": "^16.9.0 || ^17.0.0" || "rc",

And prettier updated it to

"react": "*",

I didn't give it more thought, but you're right, this is too broad.

However, if there is a prettier rule that doesn't accept 3 versions, there must be a reason, so this needs investigation.

Would you like to take a look at the problem?

@jchook
Copy link

jchook commented Apr 11, 2022

Maybe a version range is appropriate here? e.g. "react": ">=16.9.0 <19.0.0"

fzaninotto added a commit that referenced this pull request Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants