Reputation: 1083
I am rendering a c3 chart which is based on data from two source endpoints, 'characters' and 'interactions'. Because the data comes back separately the chart breaks because it renders twice. Is it possible to create a parent reducer that combines my two reducers so that only one re-render cycle is triggered by this data returning in two parts?
Upvotes: 0
Views: 240
Reputation: 618
You could use shouldComponentUpdate from react to wait both source ready.
If you need to create a "readable" data using two "datastore" sources, check reselect library, then in your selector you can return "false" or whatever if one of sources isn't ready.
Good luck
Upvotes: 1