K
K
kolyalesha2017-05-11 10:13:52
JavaScript
kolyalesha, 2017-05-11 10:13:52

Why do you need redux?

Hello. I know this question has already been asked many times, but still. I have not used the store before, but I really want to understand all its advantages.
1) Why not use a regular singleton to store data, where methods should be used instead of actions?
2) As far as I understand, all data is stored in one place and each component has access to all data, even to those to which access should not be. And without any dependencies. So? What is the advantage in this?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Gornostaev, 2017-05-11
@sergey-gornostaev

The only truly effective way to understand why something is needed is to get into the conditions for which this something was invented. Believe me, as soon as you need to write a huge and complex application for the front, and not just add a couple of click handlers and a couple of animations to the page, you will immediately understand why redux is needed.

V
Vladimir, 2017-05-11
@Casufi

https://github.com/rajdee/redux-in-russian/blob/ma...
https://github.com/rajdee/redux-in-russian/blob/ma...
It is possible without redux at all, possible with RxJS
Even without the redux of ordinary singletons in angular factory, service, provider, value, constant

K
KnightForce, 2017-05-15
@KnightForce

Abstract: You have 1 node on the left at a nesting of 500 nodes, 2 node at a nesting of 1000 and a third node at 700, all in 3 different directions and need them to work synchronously from the data. And here you have a single container from which you receive data. And in order not to pass through the props chain - use the context.
Just written

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question