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 is not a peer dependency #394

Open
farisd16 opened this issue Nov 25, 2024 · 0 comments
Open

React is not a peer dependency #394

farisd16 opened this issue Nov 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@farisd16
Copy link
Member

farisd16 commented Nov 25, 2024

Describe the bug

react and react-dom are not peer dependencies. This can cause version mismatches between React used by Apollon and React used by other dependencies in a project. Note the difference between 18.2.0 and 18.3.1:

image

Such a version mismatch may cause an error as explained under the section "Duplicate React" in the Invalid Hook Call Warning. The React website referenced in the error states that this error can occur when "a library you’re using incorrectly specifies react as a dependency (rather than a peer dependency)."

Expected behavior

react and react-dom should be peer dependencies in order to avoid errors that can be caused by version mismatches.

@farisd16 farisd16 added the bug Something isn't working label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant