Answer the question
In order to leave comments, you need to log in
How to store data in a React Redux app?
Whether the correct approach to store the received data in store?
For example, I went to the user/${id} page and put all the information in state.userData by id.
At the next transition, I received data from this state without requests to the server.
So far, the application is partially built this way, but there is a need to somehow update the data
. So far, there are 2 ideas
1. Transmit via socket if some state has been updated.
As soon as the user goes to the user/${id} page again, the flag is set to drag the data
2. Just drag the data over again each time when switching between pages
. Which of these is more suitable, how else can I implement it, what packages exist to facilitate this?
Answer the question
In order to leave comments, you need to log in
Imagine that you have a banking system. Which has dozens and hundreds of entities. Keep them all in the app store? I doubt. We keep only objects responsible for site navigation and authorization there, since these elements are used on all pages of the site.
But in the state of each page, the data that is displayed on it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question