Skip to content

How to reset the store (7.0.0-rc.2)? #357

@tkrotoff

Description

@tkrotoff

Following this PR: #324
It's not possible anymore to re-initialize the store.

Why would you do that? When unit testing getServerSideProps() for example.

With 7.0.0-rc.1 it was possible to delete window[STOREKEY] to reset the store.



Why do you memoize the store variable?

// Memoize store if client
if (!store) {
store = createStore();
}

this makes it impossible to inject an empty store.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions