Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PropType warning when passing React.lazy in component Route prop #6450

Closed
MrTibbles opened this issue Nov 2, 2018 · 1 comment
Closed

PropType warning when passing React.lazy in component Route prop #6450

MrTibbles opened this issue Nov 2, 2018 · 1 comment

Comments

@MrTibbles
Copy link

Version

"react-router-dom": "4.3.1"

Test Case

https://codesandbox.io/s/7kjzjow9r6

Steps to reproduce

Pass a React component to the component property on a Route which was loaded with React.lazy.

Expected Behavior

No propType warning.

Actual Behavior

Console:

Warning: Failed prop type: Invalid prop component of type object supplied to Route, expected function.

Notes

The code sandbox link about displays the described prop type warning in the console window.

@pshrmn
Copy link
Contributor

pshrmn commented Nov 2, 2018

See #6420.

@pshrmn pshrmn closed this as completed Nov 2, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants