Principles of Redux
The three most important Redux principles are:
- Single Source of Truth
- State Is Read-Only
- Changes are Made with Pure Functions
This React with Redux article will help you gain a working understanding of the basic concepts of this popular technology. For starters, we’ll get familiar with some of the basic Redux concepts. Once we’re done, we will create a simple React application with Redux, then an application without it. This exercise will clearly show the difference between the two implementations.
Now before we get into the depths of understanding React with Redux, let us first understand why Redux!
Demo Application: React with Redux
In this demo, we will create a web application in two ways:
- Web Application without Redux (Normal working with the use of State objects)
- Web Application with Redux (Using Store and reducers)
The goal of this application is to display a subscribe button along with a message reading “Subscribe to Simplilearn.” Once the user clicks on the button, the message changes to “Thank you for subscribing.” So first let’s start by building the application without Redux. Later on, we will look into Redux implementation. As we work through both designs, note the differences.