Failed prop type: Invalid prop `loading` supplied to `Document`, expected a ReactNode.
See original GitHub issueWhen I use a custom loader I receive this error:
Failed prop type: Invalid prop loading
supplied to Document
, expected a ReactNode.
this is my code:
const renderLoader = () => (
<div className={isDesktop() ? 'container-centered-desktop' : 'container-centered-mobile'} >
<div className="loader"></div>
</div>
);
<Document
loading={renderLoader}
...
>
Anyone Can help me?
- Chrome 81
- React-PDF 4.1.0
- React version 16.8.6
- Webpack 4.29.6
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Failed propType: Invalid prop `component` supplied to `Route ...
I'm trying new react-router 1.0.0 and I'm getting strange warnings I can't explain: Warning: Failed propType: Invalid prop `component` supplied ...
Read more >invalid prop `rows` of type `object` supplied to `forwardref ...
I am using react-native-snap-carousel, It worked fine, It fetches data fine but i am getting 2 warnings in that app. Warning: Failed prop...
Read more >reactjs/react-router - Gitter
What is wrong whne I get Warning: Failed prop type: Invalid prop 'component' of type 'object' supplied to 'Route', expected 'function'. in Route...
Read more >How to validate React props using PropTypes - LogRocket Blog
Learn how to validate props with React PropTypes, React's internal mechanism ... Based on usage, the label prop is expected to be a...
Read more >react-router invalid prop component of type object supplied to ...
Ideally, we'd have TestComponent loaded only when we're at a specific route. ... failed prop type: invalid prop supplied to expected a reactnode....
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 FreeTop 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
Top GitHub Comments
Holy crap, 3 years of development and no one ever noticed it 😄 Fixing right away. Will be available in next v5 beta or stable release.
Note: This fix was cherry-picked to v4.2.0 release.