Getting Started with Redux


Watch All Lessons in Course (30)

Managing state in an application is critical, and is often done haphazardly. Redux provides a state container for JavaScript applications that will help your applications behave consistently.

Redux is an evolution of the ideas presented by Facebook's Flux, avoiding the complexity found in Flux by looking to how applications are built with the Elm language.

Redux is useful for React applications, but React is not a requirement!

In this series, we will learn the basics of Redux, so that you can start using it to simplify your applications.

Browse the Getting Started with Redux course.

showing All 30 lessons...

Redux: The Single Immutable State Tree

Redux: Describing State Changes with Actions

Redux: Pure and Impure Functions

Redux: The Reducer Function

Redux: Writing a Counter Reducer with Tests

Redux: Store Methods: getState(), dispatch(), and subscribe()

Redux: Implementing Store from Scratch

Redux: React Counter Example

Redux: Avoiding Array Mutations with concat(), slice(), and ...spread

Redux: Avoiding Object Mutations with Object.assign() and ...spread

Redux: Writing a Todo List Reducer (Adding a Todo)

Redux: Writing a Todo List Reducer (Toggling a Todo)

Redux: Reducer Composition with Arrays

Redux: Reducer Composition with Objects

Redux: Reducer Composition with combineReducers()

Redux: Implementing combineReducers() from Scratch

Redux: React Todo List Example (Adding a Todo)

Redux: React Todo List Example (Toggling a Todo)

Redux: React Todo List Example (Filtering Todos)

Redux: Extracting Presentational Components (Todo, TodoList)

Redux: Extracting Presentational Components (AddTodo, Footer, FilterLink)

Redux: Extracting Container Components (FilterLink)

Redux: Extracting Container Components (VisibleTodoList, AddTodo)

Redux: Passing the Store Down Explicitly via Props

Redux: Passing the Store Down Implicitly via Context

Redux: Passing the Store Down with <Provider> from React Redux

Redux: Generating Containers with connect() from React Redux (VisibleTodoList)

Redux: Generating Containers with connect() from React Redux (AddTodo)

Redux: Generating Containers with connect() from React Redux (FooterLink)

Redux: Extracting Action Creators

JavaScript tutorial about Redux: The Single Immutable State Tree

Redux: The Single Immutable State Tree

2:11 JavaScript

How is Redux different from Backbone or Flux? Learn the first principle of Redux—the single immutable state tree.

We are presenting a “complete” example in the code window below. Feel free to click around and explore! We will be explaining what everything does during this course.

JavaScript tutorial about Redux: Describing State Changes with Actions

Redux: Describing State Changes with Actions

2:54 JavaScript

You will learn how Redux asks you to describe every change in the application state as a plain JavaScript object called “action”.

We are presenting a “complete” example in the code window below. Feel free to click around and explore! We will be explaining what everything does during this course.

JavaScript tutorial about Redux: Pure and Impure Functions

Redux: Pure and Impure Functions

1:19 JavaScript

Some functions are more predictable than others. You will learn the difference between the pure and impure functions. Understanding this difference is essential for writing Redux applications.

JavaScript tutorial about Redux: The Reducer Function

Redux: The Reducer Function

1:54 JavaScript

There is something in common between all Redux applications. They have to implement the reducer: a function that calculates the next state tree based on the previous state tree and the action being dispatched.

We are presenting a “complete” example in the code window below. Feel free to click around and explore! We will be explaining what everything does during this course.

JavaScript tutorial about Redux: Writing a Counter Reducer with Tests

Redux: Writing a Counter Reducer with Tests

2:36 JavaScript

You will learn how to write the reducer for the counter application in a test driven development way, as well as the conventions in implementing reducers.

JavaScript tutorial about Redux: Store Methods: getState(), dispatch(), and subscribe()

Redux: Store Methods: getState(), dispatch(), and subscribe()

3:09 JavaScript

We will learn about the Redux Store and demonstrate how its three methods let us implement a counter application.

JavaScript tutorial about Redux: Implementing Store from Scratch

Redux: Implementing Store from Scratch

2:28 JavaScript

Learn how to build a reasonable approximation of the Redux Store in 20 lines. No magic!

JavaScript tutorial about Redux: React Counter Example

Redux: React Counter Example

2:18 JavaScript

Before you use the React Redux bindings, learn how to create a complete simple application with just React and Redux.

JavaScript tutorial about Redux: Avoiding Array Mutations with concat(), slice(), and ...spread

Redux: Avoiding Array Mutations with concat(), slice(), and ...spread

3:54 JavaScript

Learn how to avoid mutating arrays using concat(), slice(), and the ES6 array spread operator.

JavaScript tutorial about Redux: Avoiding Object Mutations with Object.assign() and ...spread

Redux: Avoiding Object Mutations with Object.assign() and ...spread

2:38 JavaScript

Learn how to use Object.assign() and the spread operator proposed for ES7 to avoid mutating objects.

JavaScript tutorial about Redux: Writing a Todo List Reducer (Adding a Todo)

Redux: Writing a Todo List Reducer (Adding a Todo)

4:11 JavaScript

Learn how to implement adding a todo in a todo list application reducer.

JavaScript tutorial about Redux: Writing a Todo List Reducer (Toggling a Todo)

Redux: Writing a Todo List Reducer (Toggling a Todo)

2:47 JavaScript

Learn how to implement toggling a todo in a todo list application reducer.

JavaScript tutorial about Redux: Reducer Composition with Arrays

Redux: Reducer Composition with Arrays

2:21 JavaScript

Learn the fundamental pattern of building maintainable Redux applications: the reducer composition, and how it can be used to update items in an array.

JavaScript tutorial about Redux: Reducer Composition with Objects

Redux: Reducer Composition with Objects

2:42 JavaScript

Learn the fundamental pattern of building maintainable Redux applications: reducer composition, and how it can be used to update properties of an object.

JavaScript tutorial about Redux: Reducer Composition with combineReducers()

Redux: Reducer Composition with combineReducers()

2:10 JavaScript

Learn how to use combineReducers() utility function to generate a reducer from several other reducers instead of writing it by hand.

JavaScript tutorial about Redux: Implementing combineReducers() from Scratch

Redux: Implementing combineReducers() from Scratch

4:22 JavaScript

Learn how to build a reasonable approximation of the combineReducers() utility in 15 lines. No magic!

JavaScript tutorial about Redux: React Todo List Example (Adding a Todo)

Redux: React Todo List Example (Adding a Todo)

7:25 JavaScript

Learn how to create a React todo list application using the reducers we wrote before.

JavaScript tutorial about Redux: React Todo List Example (Toggling a Todo)

Redux: React Todo List Example (Toggling a Todo)

3:29 JavaScript

Learn how to create a React todo list application using the reducers we wrote before.

JavaScript tutorial about Redux: React Todo List Example (Filtering Todos)

Redux: React Todo List Example (Filtering Todos)

8:14 JavaScript

Learn how to create a React todo list application using the reducers we wrote before.

JavaScript tutorial about Redux: Extracting Presentational Components (Todo, TodoList)

Redux: Extracting Presentational Components (Todo, TodoList)

4:52 JavaScript

Learn how to separate the looks from the behavior by extracting presentational components.

JavaScript tutorial about Redux: Extracting Presentational Components (AddTodo, Footer, FilterLink)

Redux: Extracting Presentational Components (AddTodo, Footer, FilterLink)

8:35 JavaScript

Learn how to separate the looks from the behavior by extracting presentational components.

JavaScript tutorial about Redux: Extracting Container Components (FilterLink)

Redux: Extracting Container Components (FilterLink)

8:04 JavaScript

Learn how to avoid the boilerplate of passing the props down the intermediate components by introducing more container components.

JavaScript tutorial about Redux: Extracting Container Components (VisibleTodoList, AddTodo)

Redux: Extracting Container Components (VisibleTodoList, AddTodo)

6:19 JavaScript

Learn how to avoid the boilerplate of passing the props down the intermediate components by introducing more container components.

JavaScript tutorial about Redux: Passing the Store Down Explicitly via Props

Redux: Passing the Store Down Explicitly via Props

3:54 JavaScript

Learn how to pass store down as a prop to container components instead of declaring a top-level variable to prepare for easier testing and server rendered applications.

JavaScript tutorial about Redux: Passing the Store Down Implicitly via Context

Redux: Passing the Store Down Implicitly via Context

7:56 JavaScript

Learn how to make the store object available to all components by using the advanced React feature called “context”.

JavaScript tutorial about Redux: Passing the Store Down with <Provider> from React Redux

Redux: Passing the Store Down with <Provider> from React Redux

1:30 JavaScript

Learn how to use the that comes with React Redux instead of the hand-rolled implementation from the previous lesson.

JavaScript tutorial about Redux: Generating Containers with connect() from React Redux (VisibleTodoList)

Redux: Generating Containers with connect() from React Redux (VisibleTodoList)

5:13 JavaScript

Learn how to write mapStateToProps() and mapDispatchToProps() functions and use connect() from React Redux library to generate container components.

JavaScript tutorial about Redux: Generating Containers with connect() from React Redux (AddTodo)

Redux: Generating Containers with connect() from React Redux (AddTodo)

4:41 JavaScript

Learn how to inject dispatch() as a prop into a React component by using connect() from React Redux library.

JavaScript tutorial about Redux: Generating Containers with connect() from React Redux (FooterLink)

Redux: Generating Containers with connect() from React Redux (FooterLink)

3:27 JavaScript

Learn how to use container’s own props inside the mapStateToProps() and mapDispatchToProps() functions.

JavaScript tutorial about Redux: Extracting Action Creators

Redux: Extracting Action Creators

3:52 JavaScript

Learn how to keep code maintainable and self-documenting by extracting action creators from the components.

Presented by:

Dan Abramov

Making hot reloading mainstream. Created React Hot Loader, Redux, React DnD.