Skip to content

Make withRouter() update in response to context changes #3439

@gaearon

Description

@gaearon

I wonder if you’d be up for accepting a PR like #3430 but for withRouter() (#3352). This would eliminate the problem of “how do I connect to the router state in Redux in a deep component” because people would just wrap their deep components with withRouter and be guaranteed to get the right params.

If this makes sense to you, I’d submit a PR that moves the context fix to be used by withRouter, and change Link to use withRouter internally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions