Arrays
Explore how to manage arrays in Redux state by using safe methods for appending, deleting, and modifying elements. Understand which array methods maintain immutability and how to apply them effectively in reducers to avoid state mutations.
We'll cover the following...
We'll cover the following...
Arrays are a bit trickier because they have multiple methods for adding and removing values. In general, you have to remember which methods create a new copy of the array and which change the original one.
Methods
The following table outlines the basic array ...