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.

Warning: Invalid prop `role` supplied to `React.Fragment` at a console

See original GitHub issue

Describe the bug Display at the console: Warning: Invalid prop role supplied to React.Fragment. React.Fragment can only have key and children props.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/sub-components
  2. Click on the Console button
  3. See error

Expected behavior Clear console logs

Codesandbox! https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/sub-components

Desktop (please complete the following information):

  • OS: macOS
  • Browser Chrome
  • Version 80.0.3987.106 (Official Build) (64-bit)

Additional context Everything works, but I think it needs to fix.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
bbohlingcommented, Mar 10, 2021

@tannerlinsley - while I agree that this is all in userland, I think it is lame to use a bad approach in examples. adding additional HTML elements would be another bad approach IMO as then it would be “bad” HTML semantics. If I come up with a “good” solution I will submit a PR for the documentation

1reaction
dipenparmar12commented, Jan 15, 2022

We have this good solution(example) in official docs as well. If anybody interested. https://react-table.tanstack.com/docs/examples/sub-components-lazy

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid prop `role` supplied to `React.Fragment` at a console ...
Describe the bug. Display at the console: Warning: Invalid prop role supplied to React.Fragment . React.Fragment can only have key and children ...
Read more >
React error : Invalid prop `class` supplied to React.Fragment
It seems to be a small syntax error, your final return statement should be : return ( <div> <Helmet title={`Post | ${title}`} />...
Read more >
React Fragment warning - JSFiddle - Code Playground
Invalid prop `className` supplied to `React.Fragment`. React. ... class App extends React.Component { ... class Foo extends React.Component {.
Read more >
Unknown Prop Warning - React
The unknown-prop warning will fire if you attempt to render a DOM element with a prop that is not recognized by React as...
Read more >
React warning when open pipeline list page (with at least one ...
Open your browser console 4. Open "Pipelines" Actual results: Shows an react warning Warning: Invalid prop `data-test-id` supplied to `React.Fragment`.
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