Skip to content

Consider not polluting component props with router properties #4424

Closed
@magicmaaaaan

Description

@magicmaaaaan

Version: 4.0.0-beta.3

Currently, Route and withRouter merges all router properties with component props. This includes 11 fairly generically named properties: action, block, createHref, go, goBack, goForward, length, listen, location, push, replace. It seems unnecessary to pollute props like this.

I propose router properties should remain under a single router context rather than spreading all the properties into component props.

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