A
A
alex4answ2020-05-12 17:02:42
React
alex4answ, 2020-05-12 17:02:42

What should not be stored in the redux store?

There is a form of live search.

Is it worth storing her data in the redux store + all actions, reducers for her or not?
There is also a Dialog window that has a state of isOpened: true / false (is the popup / dialog open)

What data should be run through redux and what not?

For example, it is obvious that you don’t need to store the state of a regular form in the store and run everything through redux, you can use its state directly.

Where is the line when "this is what we store in the store", and "this is what we use the local state"?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2020-05-12
@alex4answ

If the data is used only by the component and only for the duration of its life cycle, then the state, in other cases, the storage, as the name implies, we put there what needs to be stored.

M
mk_ing, 2022-01-14
@mk_ing

Only sterilizable data should be stored , such as string number and other primitives + objects , function classes , should not be stored in store , but imported via path .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question