Skip to content

Cross-slice action does not correctly update state with immer middleware #1978

Closed Answered by dai-shi
baranyildirim asked this question in Bug report
Discussion options

You must be logged in to vote

No, you should never call actions inside set, even without immer. It just happened to work because set((state) => ({})) is a NO-OP, but it's never intended to make side effects within it.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@baranyildirim
Comment options

@dai-shi
Comment options

@baranyildirim
Comment options

@dai-shi
Comment options

Answer selected by baranyildirim
@baranyildirim
Comment options

@dai-shi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants