react-plotly.js icon indicating copy to clipboard operation
react-plotly.js copied to clipboard

Document why use this wrapper?

Open evbo opened this issue 2 years ago • 2 comments

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 avatar Sep 18 '22 14:09 evbo

@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.

Pablongo24 avatar Nov 12 '22 02:11 Pablongo24

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

damienallen avatar Sep 22 '23 13:09 damienallen