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

Made React a peer dependency. (Fixes Issue #11) #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joshhales1
Copy link

The second installation of React created by this package causes this error to be thrown and break the application:

Uncaught Invariant Violation: Element ref was specified as a string (node) but no owner was set. This could happen for one of the following reasons:
1. You may be adding a ref to a function component
2. You may be adding a ref to a component that was not created inside a component's render method
3. You have multiple copies of React loaded
See https://fb.me/react-refs-must-have-owner for more information.

This is discussed in #11 as is fixed in this PR.

Having React as a peer dependency fixes this issue. This follows the format of other React packages having React as a peer dependency.

This also massively reduces the installation time of the package.

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

Successfully merging this pull request may close these issues.

1 participant