Book Image

Learning Redux [Video]

By : Sam Slotsky
Book Image

Learning Redux [Video]

By: Sam Slotsky

Overview of this book

<p>Redux completes the missing piece of the React framework, and is used at the core of React for most complex React projects. In this course, we’ll be focusing on leveraging the Redux framework to impose better engineering on React applications. Redux is an implementation of FLUX, which is a pattern for managing application state in React. Redux brings a clean and testable design to the table using a purely functional approach.</p> <p>The course begins with the basics of React development, where you will get a better understanding of how React applications are organized compared to other JavaScript applications. Then you will learn the principles of the Flux architecture before diving into one of its most popular implementations: Redux. You’ll build a simple React application and rewrite it with Redux. By the end of this section, our Redux code will be doing all the work so that our React components can be strictly presentational.</p> <p>Moving on, we’ll turn our simple client into a single page application. We’ll use react-router to allow different URLs to render different pages, and you’ll see how to break up our application state into groups of related data. We’ll focus on retrieving lists of records from the server and paginating them, starting by leveraging the Redux framework to implement our own pagination. Then we’ll replace most of the code we’ve written so far, with a third-party package that neatly solves the problem of form submission for us.</p> <p>After that, you’ll submit the form with axios, use react-router to redirect on success, and leverage toastr to display error notifications. Finally, we’ll rip out most of our code and replace it with a popular library that’s built to manage form state. At the end, you will focus on testing different libraries for our React components, and then test our asynchronous action creators and reducers.</p> <h1>Style and Approach</h1> <p>This is an in-depth course where we’ll be focusing on leveraging the Redux framework to impose better engineering on React applications. Users are expected to have a working knowledge of node.js, webpack, and at least one data binding framework, ideally React. It's also helpful to have a basic understanding of one-way data flow, which is the key principle behind the FLUX architecture</p>
Table of Contents (6 chapters)
Chapter 1
Implementing the FLUX pattern with Redux
Content Locked
Section 4
Introducing Redux
Before diving into building applications with Redux, we should get a fundamental understanding of how we implement and organize different concerns. - Review how the store is created using reducers, which are identical to how we managed our application state in our own FLUX implementation - Review a connected component to see how state gets injected as component props - Define action creators, bind them to the dispatch, and inject them as component props to more closely mimic FLUX