You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to use the name createOne in the both slices [roomSlice, userSlice],
However, I can't... because if I used createOne() of the roomSlice in one of my components, it would think that it's the one belonging to userSlice, (even though I am importing the useCreateOneMutation from the right file) so what I have done is to use the property overrideExisting: true as follows:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following code:
userSlice.js file
roomSlice.js file
I want to be able to use the name
createOne
in the both slices [roomSlice, userSlice],However, I can't... because if I used createOne() of the roomSlice in one of my components, it would think that it's the one belonging to userSlice, (even though I am importing the
useCreateOneMutation
from the right file) so what I have done is to use the propertyoverrideExisting: true
as follows:userSlice.js file
roomSlice.js file
But it still does not work as expected, what am I doing wrong?
btw I'm not getting any warning as described in the docs

Beta Was this translation helpful? Give feedback.
All reactions