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.
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
insidereact-barcode
. These two copies ofreact
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.