Replacing state with a different slice does not work #4542
-
I am using a reducer path |
Beta Was this translation helpful? Give feedback.
Answered by
EskiMojo14
Aug 2, 2024
Replies: 1 comment 11 replies
-
I have no idea what you're trying to do here. There's no code, and I don't know what you mean by "replace state" vs "inject a different state". |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it's called initialState for a reason - it's only used when the reducer is called with
undefined
. In this case, we already have state for this reducer, so it's using that state instead and returning it.