react-cytoscapejs
react-cytoscapejs copied to clipboard
Make cytoscape a peer dependency
Since cytoscape is used by the user of react-cytoscape, it should be a peer dependency. This prevents instances where you get multiple copies of cytoscape.
https://github.com/plotly/react-cytoscapejs/issues/21 https://github.com/plotly/react-cytoscapejs/issues/17
As mentioned, by @akx in issue 17, this is similar to having react as a peer dependency. Not having it as a peer dependency can make cytoscapejs.use
not work, as you can end up with multiple copies of cytoscapejs (which is what prompted my opening of this issue in the first place)
FYI: This PR does not update the package-lock.json
This would be nice.
This readme commit by @maxkfranz https://github.com/plotly/react-cytoscapejs/commit/0edbf070bcc83afcee5b3ce42171fc0af662d5d4 basically already guides users to install Cytoscape as a peer dep anyway...
@Secretmapper Could you resolve the package.json conflict so maybe @kinimesi (having just merged #53) can then merge this? :)
@kinimesi (or someone else), could this get merged sometime soon?