Skip to content

Commit

Permalink
Merge pull request #4734 from abdullahhussein1/patch-1
Browse files Browse the repository at this point in the history
docs: remove extra word
  • Loading branch information
EskiMojo14 authored Aug 18, 2024
2 parents b59da78 + 5a171c1 commit a92a953
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/tutorials/essentials/part-8-rtk-query-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ RTK Query has many other options for controlling when and how to refetch data, i

### Updating Toast Display

When we switched from dispatching thunks for adding posts to using an RTK Query mutation, we accidentally broke the "New post added" toast message behavior, because the the `addNewPost.fulfilled` action is no longer getting dispatched.
When we switched from dispatching thunks for adding posts to using an RTK Query mutation, we accidentally broke the "New post added" toast message behavior, because the `addNewPost.fulfilled` action is no longer getting dispatched.

Fortunately, this is simple to fix. RTK Query actually uses `createAsyncThunk` internally, and we've already seen that it dispatches Redux actions as the requests are made. We can update the toast listener to watch for RTKQ's internal actions being dispatched, and show the toast message when that happens.

Expand Down

0 comments on commit a92a953

Please sign in to comment.