plotly / react-cytoscapejs

React component for Cytoscape.js network visualisations
MIT License
472 stars 69 forks source link

Add support for options #30

Closed ocanty closed 4 years ago

ocanty commented 5 years ago

See #13

maxkfranz commented 5 years ago

While I think this would work well in many cases, it could be confusing in some cases. Which options do I specify as the options prop and which do I specify as direct prop? For example, I could specify options.elements and elements. Which one takes effect? What if I use both? Only one of those would work with the diffing and patching.

I think it might be better to individually consider options and add them as direct props. I think we could use these:

I don't think it makes sense to allow for setting flags like headless at all, considering this is a React component: You always want the visualisation.