Replies: 1 comment 4 replies
-
I don't think you want to extract an |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am working through the Organizing Listeners in Files section of the docs, and while I like the first suggestion theree — roughly co-locating the effects with the redux slices whose actions they listen to — I am struggling to reconcile this with proper typescript annotations.
In the following example from the docs:
how would
listener1
know the types of its parameters?Here's what I've tried so far:
However, the
Effect
type thus extracted insists that its first parameter must beAnyAction
, and complains if I try to pass it aPayloadAction
.What's your guidance on this?
Beta Was this translation helpful? Give feedback.
All reactions