Chaining Asynchronous Dispatches in Redux Toolkit

Опубликовано: 22 Август 2022
на канале: Covalence
5,795
116

In this video I cover how we can correctly dispatch one action after another, where the second dispatch is informed by the state changes from the first. This is doable if you can "calculate" what your next state will be. If it is entirely asynchronous, however, then we need to get clever. Enter Redux Thunks via createAsyncThunk provided to us by Redux Toolkit! We can then set up some thunks to daisy chain asynchronous dispatches.

Link to the video where I build a quick Redux Toolkit Implementation if you need a crash course in it:
   • How to Persist Redux State to an API ...  

Link to starting boilerplate code for the video:
https://github.com/przekwas/daisy-cha...

Don't forget to like this video and subscribe to our channel – we're publishing more videos and walkthroughs every week. Comment below and let us know what you'd like to see next!

Join the Covalence community: https://covalence.io

Shop Covalence merch: https://covalence.merchntly.com


Смотрите видео Chaining Asynchronous Dispatches in Redux Toolkit онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Covalence 22 Август 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 5,795 раз и оно понравилось 116 людям.