Closed Shooshte closed 7 years ago
Please use Stack Overflow tag d3.js to ask for help. Although I make an effort to assist everyone that asks, I am not always available to provide help promptly or directly. Stack Overflow provides a better collaborative forum for self-help: tens of thousands of D3-related questions have already been asked there, and some answered questions may be relevant to you.
When asking for help, please include a link to a live example that demonstrates the issue, preferably on bl.ocks.org. It is often impossible to debug from code snippets alone. Isolate the issue and reduce your code as much as possible before asking for help. The less code you post, the easier it is for someone to debug, and the more likely you are to get a helpful response.
If you have a question about D3’s behavior and want to discuss it with other users, also consider the d3-js Google Group or joining the d3-js Slack.
Thank you! 🤗
I am trying to integrate d3 with react and mobx. I have a store that gets some data from the server, and a computed that returns only part of that data (this is the only part of my code where I am setting
this.showError
,this.errorMessage
):Then I inject the store into my app, destructure the observables and print an error message if there is one, and if there is no error, I pass the data to a Price Chart component:
This is the chart component that uses d3:
Now what happens is that when the d3 library fails, the errorMessage gets set in the store. How is that possible?
A working example can be found here - https://github.com/Shooshte/bitgraph. Just pull,
npm i
,npm run start