08 - Setting up our state with createEntityAdapter functions and thunks

Published: 04 January 2021
on channel: Rowadz
6,797
144

Buy me a coffee if this is useful 😀
https://www.buymeacoffee.com/rowadz

In this video, I'm explaining how to normalize the state shape according to the redux documentation


A follow-up video about saving multiple adapters state in the same slice
   • 05 - Combining multiple createEntityA...  

previous video about normalizing the state
   • 07 - Normalizing the State Shape an i...  

more on create entity adapter

   • Entity Adapter CRUD - redux toolkit  

repo:
https://github.com/Rowadz/react-redux...

docs:
https://redux-toolkit.js.org/api/crea...

redux toolkit videos:
   • 🏟️ Redux Toolkit 🏟️  

redux and react videos
   • ⚛️ Redux & React ⚛️  


00:00 Introduction
00:55 What does the createEntityAdapter function do
03:09 Looking at the docs example
04:00 The "generated" action creators
05:16 Creating a thunk to get data
07:36 Creating the users slice
08:12 Creating the users adapter and putting them into reducers
10:33 Using setAll action creator
11:07 Adding our new slice to the store
11:30 Dispatching actions/async actions in the Users component
13:10 Looking at the redux devtool
14:18 normalizing the nested objects


Watch video 08 - Setting up our state with createEntityAdapter functions and thunks online without registration, duration hours minute second in high quality. This video was added by user Rowadz 04 January 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 6,797 once and liked it 144 people.