Unexpected immer
middlerware behavior on delete
key at root of state
#2480
Unanswered
simlmx
asked this question in
Bug report
Replies: 2 comments
-
Yeah, if that's the case, |
Beta Was this translation helpful? Give feedback.
0 replies
-
@simlmx ping me if you need some help with the PR |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This test cases sums it up:
The last
expect
fails.If I understand correctly, what is happening is that the two states are merged together; when using
immer
, shouldn't we always setreplace=true
, sinceimmer
takes care of merging the states.Indeed if I modify the
immer
middleware plugin and hardcodereplace=true
, the problem goes away.Beta Was this translation helpful? Give feedback.
All reactions