Skip to content

GetState interface #18

Open
Open
@AngusMorton

Description

@AngusMorton

A GetState interface would allow us to hide the Store type when using it in situations that shouldn't have access to the Store methods.

This is relevant for cases where you don't want the consumer to be able to do operations on the Store. e.g. redux-observable where the Epic should not have access to the Store because that would allow the Epic to dispatch actions manually, which would be an error.

It would probably look something like:

interface GetState<S> {
   S getState();
}

The Store<S> would implement the GetState interface.

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