Skip to content

Enhancer types are lost when using callback form, and state extensions not reflected #3206

Closed
@EskiMojo14

Description

@EskiMojo14

#2550 made a great start on getting enhancers typed properly!

Unfortunately, the inference still wasn't there when using the callback form, e.g.

const store = configureStore({ reducer: () => 0, enhancers: (defaultEnhancers) => [...defaultEnhancers, myEnhancer] });

The above wouldn't pick up any store extensions.

Additionally, the StoreEnhancer type has a StateExt generic that's not used by RTK - presumably it would make sense for this type to be reflected in the final getState return.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions