Skip to content

[BUG] Component connected to state with mapStateToProps #1816

@vieks

Description

@vieks

I have only one connected component at the top level for the whole application.

I made some tests, and the problem is the following:

I have 2 reducers (locale and products). Only one of them is connected to the app with mapStateToProps.

const mapStateToProps = state => ({
    locale: state.get('locale'),
});

But if I update the products reducer that is not connected to the app, The mapStateToProps is anyway called and so on it will trigger my application re-rendering !

Why this behavior since products is for sure updated on my store but is not connected to the app ???
Normally it should skip the re-rendering process since that state part is not mapped to any props.

Versions:
"react-redux": "^4.4.5",
"redux": "^3.5.2",

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