Core Redux API
Learn how to implement Redux state-management into your application by learning the core methods of the Redux API.
StartKey Concepts
Review core concepts you need to learn to master this subject
Installing Redux
Create the Redux Store
The getState()
Method
The dispatch()
Method
The subscribe()
Method
Action Creators
Slices
The combineReducers()
Function
Installing Redux
Installing Redux
npm install redux
The redux
package is added to a project by first installing it with npm
.
Some of the resources imported from redux
are:
createStore
combineReducers
Intro to the Core Redux API
Lesson 1 of 2
- 1In this lesson, you will learn how to apply the core concepts of Redux to a real Redux application. Remember, Redux applications are built upon a one-way flow of data model and are managed by the …
- 2The core concepts of Redux are closely tied to a framework known as Flux. Both share the same concept of a one-way flow of data and a centr…
- 3As you know, every Redux application uses a reducer function that describes which actions can update the state and how those actions lead to the next state. For example, suppose you wanted to buil…
- 4The store object returned by createStore() provides a number of useful methods for interacting with its state as well as the reducer function it was created with. The most commonly used method, st…
- 5As you saw in the last exercise, you are likely to dispatch actions of the same type multiple times or from multiple places. Typing out the entire action object can be tedious and creates opportuni…
- 6In a typical web application, user interactions that trigger DOM events (“click”, “keydown”, etc…) can be listened for and responded to usin…
- 7Up until now, you have built a working counting application using Redux that lacks a proper user interface (UI). Let’s change that! The UI for this application should display the current count num…
- 8As you saw in the last exercise, Redux can be used within the context of any UI framework, though it is most commonly paired with React. This makes sense considering that React and Redux were both …
- 9Now that you have implemented the counter app using the HTML DOM API, and have seen a working React+Redux application, it is time to implement it using React. Take a look at the store.js file …
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory