Let's say I have some data tables, like a list an admin report returning a list of users (with details) or a list of log records. Does this info belong in the redux store, where only the data table needs this info? Or what if I am plotting something with 5000 nodes. Does this belong in redux single app state too? Why or why not?
If these items do not belong in the app state, is it just the local component state I should be loading these into without redux? Seems nice to have all my async requests fetched similarly, though.
Your Redux store imposes no limitations on the size of the data stored. Dispatching an action that performs this operation will not downgrade the performance of your app, so you can safely store any amount of data in your app's state.
The following points of discussion should help anyone working with Redux on large, data intensive applications: Section 2: Separation of state between data objects, edits to those objects, and other UI state Section 3: Sharing of state between multiple screens in a Single Page Application, and when not to
Redux stores are global states that store data you want to use across multiple components without drilling props at every level in your component tree. As an app gets large and complex, you might want to store large, bulky data inside your Redux store and access it inside a component.
This adds the large data inside the store without any flickering or UI lag, indicating that there is no performance difference when you add large data in the app state. You can try out with an even larger data set but the results will be the same.
Since redux doesn't care about the data (it literally just calls reducer functions when actions are dispatched, and replaces the current state with the result), there shouldn't be any performance issue there. It will be as performant as the reducer functions you provide.
If you'd like to see for this directly: https://github.com/rackt/redux/blob/master/src/createStore.js#L115
You're more likely to run into performance issues with react, but even then its doubtful at that scale. You may want to virtualize your table so that you're not rendering out of view elements, but that's a common problem with ui programming.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With