kciter / react-barcode

A <Barcode/> component for use with React.
http://kciter.github.io/react-barcode/
ISC License
400 stars 72 forks source link

package.json: move react to peerDependencies #7

Closed JLHwung closed 7 years ago

JLHwung commented 7 years ago

Move react to peerDependencies to mitigate Refs Must Have Owner warning, see https://facebook.github.io/react/warnings/refs-must-have-owner.html

Situation: When a webpack project have locked react version i.e. 15.3.2, npm will install react@15.4.0 inside react-barcode. These two copies of react will trigger Refs Must Have Owner warning.

Moving react to peerDependencies will solve it.

Some famous react library also move react to peerDependencies. i.e. material-ui, react-datagrid.

kciter commented 7 years ago

Thank you :)

JLHwung commented 7 years ago

You are very welcome.