question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed prop type: Invalid prop `loading` supplied to `Document`, expected a ReactNode.

See original GitHub issue

When 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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
wojtekmajcommented, Jun 22, 2020

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.

0reactions
wojtekmajcommented, Jul 27, 2020

Note: This fix was cherry-picked to v4.2.0 release.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found