Using Redux and TypeScript introduction

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

Previous LessonHow to Use Hooks With Higher-Order ComponentsNext LessonUsing Redux and TypeScript preview the final result

Lesson Transcript

  • [00:00 - 00:09] When you work with React, you usually end up with a global state that is accessible across the whole application. One of the ways to make this state available through the whole application is to use the context API.

  • [00:10 - 00:18] You saw an example of this approach in the first part of this course, where we built a Trello clone. There, we've used it with a useReducer hook to manage the global application state.

  • [00:19 - 00:28] This approach works, but it can only get you so far. In the end, you will have to invent your own ways to manage side effects, split your code into modules, and debug your code.

  • [00:29 - 00:34] In such case, it would be a better idea to use a specialized tool. For example, to manage the state, we could use Redux.

  • [00:35 - 00:47] In this part of the course, we will build a drawing application using Redux and TypeScript, and then we will upgrade it to use Redux Toolkit. This way, you will learn how to work with raw Redux, as well as the most modern techniques for using it.

This lesson preview is part of the Fullstack React with TypeScript Masterclass course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.

This video is available to students only
Unlock This Course

Get unlimited access to Fullstack React with TypeScript Masterclass, plus 70+ \newline books, guides and courses with the \newline Pro subscription.

Thumbnail for the \newline course Fullstack React with TypeScript Masterclass

When you work with React, you usually end up with a global state that is accessible across the whole application. One of the ways to make this state available through the whole application is to use the context API. You saw an example of this approach in the first part of this course, where we built a Trello clone. There, we've used it with a useReducer hook to manage the global application state. This approach works, but it can only get you so far. In the end, you will have to invent your own ways to manage side effects, split your code into modules, and debug your code. In such case, it would be a better idea to use a specialized tool. For example, to manage the state, we could use Redux. In this part of the course, we will build a drawing application using Redux and TypeScript, and then we will upgrade it to use Redux Toolkit. This way, you will learn how to work with raw Redux, as well as the most modern techniques for using it.