I'm currently building React UI component package that will be published to NPM.
I added React and ReactDOM to peer dependencies as it should be. However inside my library I have dependencies on modules like react-dates that also have React as peer.
And when I do npm i inside my package I got a lot of warnings like this that pollute my terminal:
warning " > react-dates@21.2.0" has unmet peer dependency "react@^0.14 || ^15.5.4 || ^16.1.1".
warning " > react-dates@21.2.0" has unmet peer dependency "react-dom@^0.14 || ^15.5.4 || ^16.1.1".
As a workaround I decided to also add React and ReactDOM to devDependencies and warnings disappeared.
Do you think it's a good approach to duplicate dependencies in dev and peer?