Where according to the concept redux-and it would be correct to store an object data source for the calculation of the state?

My app works in the following way, at page load I by isomorphic-fetch and redux-thunk download json file with a large amount of statistical data (until it is loaded, notify the user by preloader). Download function cause the method componetDidMount the only intelligent component in the application. After downloading, it displays the initial state - the user interacts with the page, choosing certain options, depending on the options selected, the object with the statistical data is not frail processing (different map, filter, groupBy, reduce, etc.), resulting in state is transmitted only a small part of the original object. And here I was thinking, and where it would be correct to store the object. Keep it in a state is probably not correct. It turns out I have redusere (reducers/myReducer.js) to announce the let object = myStats = {}; in a function that handles the action download the file with the statistical data to assign to the file and rasparenny this json object. In all other action handlers (which are called depending on user input) already refer to this object to calculate the current state. I correctly argue? If not, correct me.
July 8th 19 at 16:35
1 answer
July 8th 19 at 16:37
Personally, I would did the same thing. Only in the state of the component does not need to load the processed data. It seems to me more true in the state component to store the current selection of the user, and to generate data on the fly from reducer. Or, if you generate to have to do more reduceron which will store the results of calculations to speed up calculations.

Find more questions by tags ReduxReact