react-plotly.js
react-plotly.js copied to clipboard
Document why use this wrapper?
I get that this is a thin wrapper and I don't want to nitpick but why exactly is it necessary? Could the readme introduce the use for it?
I just created a component, made a div called "graph", and plopped Plotly.newPlot(..)
in a useEffect
and it gave me a beautiful plot with all features working in this demo:
https://codepen.io/plotly/pen/edZXdj
Of course, this is a trivial example. What am I missing here? It's nice to know these things because I'm also seeing some of the animations features aren't fully implemented in this repo so one naturally wonders is it easier to just use the base library?
@evbo after struggling to do several tasks using this wrapper and seeing this issue you posted, I decided to refactor my code to NOT use this wrapper.
It was a bit frustrating to see examples in the main plotly docs that didn't quite work with this wrapper or required too much tweaking.
I found the following proposal as a great example of a "thinner" wrapper: https://github.com/plotly/react-plotly.js/issues/226
Gist: https://gist.github.com/tony/f0938e379aef3c49648a2b1b63e00807