Skip to content

Type problem with wrapped createSlice #4020

Closed Answered by EskiMojo14
medihack asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for raising the issue regarding the regression with wrapping createSlice! Admittedly I've never been particularly keen on the approach as the typing for createSlice is pretty fragile (as demonstrated by this regression).

As an alternative, have you considered an "adapter" approach like we've done for createEntityAdapter? See this codesandbox for a proper demo.

We're also investigating "custom slice creators" which would have the capability of creating multiple reducers in one go.

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
1 reply
@EskiMojo14
Comment options

Answer selected by EskiMojo14
Comment options

You must be logged in to vote
9 replies
@medihack
Comment options

@EskiMojo14
Comment options

@EskiMojo14
Comment options

@medihack
Comment options

@EskiMojo14
Comment options

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