Module details

State management with Redux

Length: 6 hours

Level: A

Categories: React

Description

Every app we write has some kind of state – it could be a shopping list or a gym schedule. The more complex our apps get, the more state they need to manage, hence the need for managing it properly. One of the most popular state management libraries is Redux – a single-tree storage based on Flux architecture.

Book a training
Agenda

a. Introduction to Redux

Talk about CQRS and Event Sourcing and how Redux architecture implements these patterns, explain data flow.

b. Reducers, actions, and working with a Redux store

Show reducers, actions and redux store in the data flow and put it into practice by building some.

c. Using Redux with React

Use react-redux and explain what’s available there and how to avoid unnecessary re-renders with selectors and memoization.

d. Using and writing redux middleware

Explain the middleware concept, how we can hook existing ones into our Redux pipeline and how to create your own.

e. Working with AJAX calls and other side effects

Show how synchronous Redux can handle asynchronous data flow.

f. Unit testing redux apps

Most of the tests are simple to write as we’re dealing with pure functions. Explain how to test async workflow and connected React components.

g. App state persistence using redux-persist

Do’s and don’ts of persisting data in Redux – when it’s a good idea to store it and when it’s not, and how to version stored data.

Other modules

See more
modules