So why use Redux?

If you have created React applications before, you will have worked with state. When building very small web applications, you likely had no issues with state. However, if you have spent time building a larger web application, you will have passed state down as props to child components who may have then passed those props down once again. In fact, you could technically pass down your state as props an infinite number of times. And once you’ve passed down your state to the child of the child of the child of the etc… of the parent component, you might then want to create a function that passes state back UP the component chain.

So at this point you need to write a function in the parent component and pass it down x number of times. It is likely that you would pass down multiple pieces of state as props throughout your application to a number of different components. After a while, it becomes difficult to keep track of all the state and props that your application has. Modifying your web application could become a nightmare if you decide to do any major (or even minor) refactoring of code. In other words, after a certain point React tends to scale poorly.

#react #redux #coding #javascript #components

A Guide to Setting Up Your First Redux Application
1.60 GEEK