react-mathjax icon indicating copy to clipboard operation
react-mathjax copied to clipboard

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

Open joshhales1 opened this issue 3 years ago • 0 comments

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.

joshhales1 avatar Jul 29 '21 14:07 joshhales1