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 `children` of type `array` supplied to `ForwardRef(ListItemIcon)`, expected a single ReactElement.

See original GitHub issue

Failed prop type: Invalid prop children of type array supplied to ForwardRef(ListItemIcon), expected a single ReactElement. failed Proptypes

<ListItem style={{“marginTop”:“-16px”,“marginBottom”: “-7px”}} button key={i+“i”} > <ListItemIcon key={i+ subOption.text+‘d’ } className={classes.menuPosition}><span key={ subOption.text+1+i+1 } className={subOption.icon}/> </ListItemIcon> <ListItemText style={{marginBottom:‘-5px’,marginTop:‘-8px’, padding:‘0px 16px’}} key={i+ subOption.text+‘e’} primary={ subOption.text } className=“menu-text-Color” /> </ListItem>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

20reactions
nagad814commented, Dec 5, 2019

My code <ListItemIcon> <HomeIcon className={classes.icon}/> </ListItemIcon> showed the same error. When i remove the white space and moved to new line i was able to remove the error

15reactions
iagokrtcommented, Apr 2, 2020

i just have the same error, wrapping all inside a fragment (</>) resolved:

<ActionButton>
   <>
      <OtherComponentButton />
      <OtherComponentButton />
    </>
</ActionButton>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid prop `children` of type `array` supplied to `ForwardRef ...
Failed prop type : Invalid prop children of type array supplied to ForwardRef(ListItemIcon), expected a single ReactElement.
Read more >
React error 'Failed propType: Invalid prop `children` supplied ...
According to the doc, you can just use a normal React element instead of a function inside <Provider /> . As a result,...
Read more >
Warning: Failed prop type: Invalid prop `children` supplied to ...
Warning: Failed prop type: Invalid prop `children` supplied to `ForwardRef(Typography)`, expected a ReactNode. */<Typography key={item.id}>
Read more >
invalid prop `rows` of type `object` supplied to `forwardref ...
Failed prop type: Invalid prop children of type array supplied to ForwardRef(ListItemIcon) , expected a single ReactElement. failed Proptypes.
Read more >
2 Answers - OneCompiler
Getting Warning: Failed prop type: Invalid prop `children` supplied to `ForwardRef(Tooltip)`. Expected an element that can hold a ref.
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