Warning: Invalid prop `role` supplied to `React.Fragment` at a console
See original GitHub issueDescribe 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:
- Go to https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/sub-components
- Click on the Console button
- 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:
- Created 4 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top 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 >
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
@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
We have this good solution(example) in official docs as well. If anybody interested. https://react-table.tanstack.com/docs/examples/sub-components-lazy