What is the Redux State?
Understand the concept of state in applications through examples.
We'll cover the following...
We'll cover the following...
Fundamentals of state
We’ll build a simple counter app to understand the concept of state.
Let’s create an HTML file named index.html.
- Insert an
h1tag to display the counter value. - Insert a
buttonto let the user increment the value by one.
Now, let’s create a JavaScript file named index.js.
- Declare a variable
counterand initialize it with0. - Declare a function
add()to increment thecountervalue by one and display the updated value in theh1