Let’s say you need to save a list of items in the store.
A bad approach would be to save the data as an array on the store:
[{ id: 1, name: 'Kate' }, { id: 2, name: 'Jane' }]
Many applications have repeating functionality for different reducers with minor changes. For example, many forms that have view and edit modes.
A bad approach would be to duplicate the reducer code:
Complex applications usually deal with data structures that have associations, e. g. posts that have comments.
A bad approach would be to save the data nested in the state:
posts: id: 1 title: 'Better Redux'…
posts: id: 1 title: 'Better Redux'
Let’s say you need to display a filtered list of products.
A bad approach would be to save the filtered list on each filter change in a component’s state or in a different key in a Redux store.
onFilterChange(filter…
onFilterChange(filter
by Ilya Birman