Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript Error when using states created via combineReducers with Redux >v4.0 #2

Open
brwarner opened this issue Nov 7, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@brwarner
Copy link
Collaborator

brwarner commented Nov 7, 2021

A recent change to Redux's type definitions has made the CombinedState<S> type imcompatible with Record<string, unknown>. This causes a type error when trying to pass such a state into any of this library's methods. (for an explanation on why, see: microsoft/TypeScript#46715)

A temporary solution is to keep using Redux v4.0.0. If you're using a newer version of redux/toolkit, you can add a resolutions block to your package.json like so:

"resolutions": {
    "redux": "4.0.0"
}

I have yet to encounter any issues user newer versions of toolkit with v4.0.0 of redux, but an real solution should be found to update this library.

@brwarner brwarner added the bug Something isn't working label Nov 7, 2021
@brwarner brwarner self-assigned this Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant