Skip to content

Confusing documentation #83

@arkwright

Description

@arkwright

Redux docs state:

[We] wrap the components we want to connect to Redux with the connect() function from react-redux. Try to only do this for a top-level component, or route handlers. While technically you can connect() any component in your app to Redux store, avoid doing this too deeply, because it will make the data flow harder to trace.

https://rackt.github.io/redux/docs/basics/UsageWithReact.html

But, in a seeming contradiction, react-redux README states:

Don’t do this! It kills any performance optimisations because TodoApp will rerender after every action.
It’s better to have more granular connect() on several components in your view hierarchy.

I'm not sure whose advice to follow!

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