I
I
ivan05122020-08-04 19:54:53
redux
ivan0512, 2020-08-04 19:54:53

Whether to take out the maximum logic in the store?

An interesting opinion is whether it is worth taking the logic from the components to the maximum to the shared storage, and splitting it up as much as possible to ensure data isolation?

And in general, how careful should you be when transferring data to the store?
Do you have any practice in your companies, until what point should props be pushed, or synchronized with parent components.

Now I am faced with the situation that the project in the store contains only the most global, for example, the current language, theme, and so on. And most of the data is stored at the page component level. How do you feel about this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
McBernar, 2020-08-04
@McBernar

Well, this is a normal approach, which the react itself preaches - to keep the state exactly where it is needed.
Redax is, of course, that Frankstein. As if it was impossible to make a normal two-way event bass between child components and the parent out of the box.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question