Skip to content

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

Open
joshhales1 wants to merge 2 commits intowko27:masterfrom
joshhales1:master
Open

Made React a peer dependency. (Fixes Issue #11)#24
joshhales1 wants to merge 2 commits intowko27:masterfrom
joshhales1:master

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