How to add an array item inside array of objects of an object in react-redux toolkit?
I am trying to update the user
object’s blockedUsers
array, while keeping other data not changed. user
object can have blockedUsers
array or not, it is not certain. In slice I have:
How to pass Cache-control in RTC query in get request?
I recently started learning RTK Query and I’m now studying how to work with caching. Could someone please suggest the best way to send the Cache-Control header in a request? I’ve seen the following approach in the web, and I’d like to know if it’s correct.
Use rejectWithValue to send original error object to middleware
I have a middleware that specificly reacts on two types of status codes of requests. Also I have a bunch of thunks that looks like this: