Skip to content

Binding Store getState and subscribe calls properly in @next version #464

@vhmth

Description

@vhmth

I noticed, per following the conversation here, that a rewrite of connect would fix the bottom-up state updates I was seeing in my nested container components.

I went ahead and tried to make that work with the react-chrome-redux lib which creates a simple Store object from the content scripts of Chrome extensions (using an es6 class).

I noticed that the this context within the react-chrome-redux Store was undefined and noticed that the new rewrite of connect was not respecting the store's own context when calling getState and subscribe.

Since the previous version of connect used to respect this context in subscribe and getState, I believe we should respect it in the new version of connect as well (unless there's a good reason not to - in which case it should probably be stated as a potential breaking change for any libs that roll their own Stores that rely on having a local context).

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