Skip to content

Invalid prop path of type regexp supplied to Route, expected string #6418

@Fi1osof

Description

@Fi1osof

Version

PropTypes require String or [String] for Route, but Route allow use regex too.

Test Case

https://codesandbox.io/s/yv2z0x7qo1 (See route for topics).

Expected Behavior

No warnings.
Allow types: String, RegExp, [String, RegExp]

Actual Behavior

Warning: Failed prop type: Invalid prop path of type regexp supplied to Route, expected string.
in Route

react-router-dom@4.3.1

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