Breaking SemVer
Hello,
I'm helping out on someone's React 15 project, and updating this module from 1.1.0 to 1.1.1 broke the component. A point release should indicate a backwards compatible bug fix change only but that doesn't seem to be the case. Reverting to 1.1.0 fixes the issue.
You may want to check out NPM's SemVer guide and I'm not an NPM expert but I believe that the dependencies section in your package.json file should be a peer dependencies section instead e.g:
"peerDependencies": {
"prop-types": "^15.5.10",
"react": "^16.2.0",
"react-dom": "^16.2.0"
}
Probably prop-types could be a dependency, but react and react-dom should be peers.
If I understand correctly, by having React in your dependencies section I get a copy of React 16 installed by your component in addition to my own copy of React (v15). See https://blog.angularindepth.com/npm-peer-dependencies-f843f3ac4e7f
Yes, you're totally right. Feel free to submit a PR on this if you're keen. Otherwise I'll update it in the next couple of days.