[BUG] addReaction.onQueryStarted should also update getPost(id) query cache.
In the RTK version of the tutorial, addReaction mutation optimistically updates the reaction data in the getPosts cache. But it should also update the cache for getPost(id) query as well. Otherwise, addReaction mutation is not reflected in the SinglePostPage.
I cannot contribute a PR because this version of code doesn't have a corresponding branch (it only has a tag).
https://github.com/reduxjs/redux-essentials-example-app/blob/dcc6064e3f0edfb859d33e28ef03fd8a010ad4a0/src/features/api/apiSlice.js#L43-L60
How to update the cache for getPost(id)?
Very belated answer, but yeah, good catch! I missed that.
I'm working on some updates to the example app and tutorial, and will include that.