Course lesson
Migrate a Redux Thunk to RTK Query
This our longest lesson. It covers territory that we've already covered, but in a more advanced way. Here are some of the main points.
- Duration
- 4 min
- Access
- Free
- Transcript
- Needs source
This our longest lesson. It covers territory that we've already covered, but in a more advanced way. Here are some of the main points.
- When you migrate redux state into RTK Query, by mindful that you may have had initial state, which should usually be replaced with an
isLoadingcheck - Like everywhere else we rely on destructuring asignment to give meaningful names to the generic
dataproperty returned from our query hook. - We're also using optional chaining to deal with
databefore we receive a server response - We're continuing to update our
getServicesForLuckyDogselector here and pass in additional data, this time for our dogs