I am creating a realtime dashboard which consumes an API for the data. The application is an isomorphic react app built on top of a node API, I am using the Flux architecture, more specifically the alt implementation.
My question is the dashboard has around 4/5 realtime charts (I am using a React D3 library), each chart calls an API endpoint. I have a main <Dashboard /> component and inside this each chart component lives. My question is should the <Dashboard /> be responsible for listening for data and passing it though as props or should each graph component be responsible for its own store/action life cycle? If I pass the data through as props this would this mean the UI would rerender more than is required?
I have yet to find any examples of React/Dashboard/Charting application so if anyone knows of any this would be very useful.
stores. But having it the way you mentioned should be okay. And you wouldn't rerender more than it is required. Each of yourchildcomponents could havecomponentWillReceiveProps()and if the props didn't change you wouldn't need to rerender those componentsshouldComponentUpdate()facebook.github.io/react/docs/…