Skip to content

Typing dispatch without a global store #1584

Answered by phryneas
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

The correct type for that reducer would be Dispatch<AnyAction>. It doesn't matter what is dispatched as long as it is a valid action - some actions will just be ignored while others won't be.

That is also what you would get from store - with additional middleware typings, which don't play a role in your case.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ghost
Comment options

@phryneas
Comment options

@ghost
Comment options

@phryneas
Comment options

@ghost
Comment options

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