Skip to content

Expose notifyListeners in the store API #3180

Closed
@migueloller

Description

@migueloller

When creating a store enhancer and reimplementing the dispatch() method, one usually has to reimplement subscribe() and keep track of listeners. If the store expose notifyListeners() in its API, it would greatly simplify some store enhancer implementations.

For example, redux-batched-subscribe's source code almost reimplements all of Redux but loses on the benefits of good error messages and other updates to the Redux codebase. If notifyListeners() was exposed, then it would only reimplement dispatch() and not subscribe().

Thoughts?

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