The simplest answer to - should I use Redux in my React app?
There are a lot of good answers on the internet for this question already, I have no doubt that they all provide a much more complete explanation. But sometimes a high level understanding is enough to make an decision, instead of wasting hours of research then come to the decision that it is not needed. In this article, I’ll give the shortest answer I can come up with to answer this question.
And here it is:
The diagram is too vague? Need more explanation? Ok, assuming you have an application that is made up with components Root, A, B, C, D, E and F. Root component is the top level, and then state is passed to A and D respectively, these components then have child components of B and E respectively and etc. If the components of share states then using Redux in your application would make development a lot easier.
Compare the above examples, which would be easier to sync state between B and E? In the React example, state will flow like this B => A => Root => D => E. Whereas in the Redux example, state will flow from B => store (not shown in the diagram) => E.
I hope this article was useful to some of you. For a more detailed explanation of what Redux is and how it works I recommend the official documentation for Redux. If you want to understand more about React states, here is the official documentation as well.