Redux Framework
In this lesson we will learn about a very useful and valuable JavaScript library called Redux. The name of the library comes from two words - the name of the reduce function and the Flux architecture of React applications, which is based on the use of a unidirectional data flow.
First of all, Redux is a predictable container or store for the state of your application's data. We've already encountered the concept of state
in the React tutorial. With Redux, you can write client-side, server-side, or native applications that behave predictably, scale easily, and are testable.
What else is so attractive about Redux? It helps us manage the global state of the application. The tools and techniques used in Redux make it easier to understand where, why, and how the state has changed, as well as how the application logic will behave in the event of such changes.
Redux - This is a standalone library, but it can be used in conjunction with such popular frameworks as React, Angular, Vue, and pure JavaScript. Looking a little ahead, I will say that in our tutorial we will use a bundle with React.
Despite the importance of this tool, when building an application, you should wisely evaluate the need for its use. You need Redux if you have a large number of states needed in different parts of the application, or the states change very often, or maybe you have too complex logic to update the states.