React.lazy makes Route's proptypes fail
See original GitHub issueHello,
The newly introduced React.lazy for easy code-splitting is making the Route component proptypes to fail with the warning :
Warning: Failed prop type: Invalid prop `component` of type `object` supplied to `Route`, expected `function`.
Version
react-router-dom: 4.4.0-beta.4 react: 16.6.0
Test Case
I took the official example from here : https://reactjs.org/docs/code-splitting.html#route-based-code-splitting
Issue Analytics
- State:
- Created 5 years ago
- Reactions:58
- Comments:28 (7 by maintainers)
Top Results From Across the Web
React.lazy makes Route's proptypes fail · Issue #6420 - GitHub
Hello, The newly introduced React.lazy for easy code-splitting is making the Route component proptypes to fail with the warning : Warning: ...
Read more >React Router with React 16.6 Suspense "Invalid prop ...
The console warning is as follows: Warning: Failed prop type: Invalid prop `component` of type `object` supplied to `Route`, expected `function ...
Read more >Code-Splitting - React
React. lazy takes a function that must call a dynamic import() . This must return a Promise which resolves to a module with...
Read more >Improve React Performance using Lazy Loading and Suspense
The Promise resolves if the module loads successfully and rejects if there was an error in loading the module, due to network failure,...
Read more >How To Handle Async Data Loading, Lazy Loading, and Code ...
js Line 13:6: React Hook useEffect has a missing dependency: 'name'. Either include it or remove the dependency array react-hooks/exhaustive- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@rnnyrk I just did the following for now 🤷♂️
@pshrmn hey,when will you publish 4.4.0 version,this is a common problem。