Skip to content

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

@brwarner

Description

@brwarner

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions