Search⌘ K
AI Features

Exercise Solution

Understand how to implement contact deletion in Redux by creating actions, dispatching them, and updating the state immutably via reducers. Learn the practical steps to handle active user state changes and maintain app state consistency while working on a chat application.

We'll cover the following...

If you figured it out on your own, you should be impressed with your grasp on Redux.

Nevertheless, it’s good to look at different ways to approach the problem. This is how I did it.

The first step in doing something new is always creating a new action. In the constants/action-types.js, we’ll add our “DELETE_CONTACT” string. Again, this optional, but a safe ...