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.

Props not passed when Items inside intermediary component

See original GitHub issue

Hi! While running similar code to the following, I find that, when Item is placed inside a fragment, or inside of another component that goes into Menu, the click event received by the handler is undefined, and the props aren’t passed on.

<Menu>
  <Item onClick={onMenuItemClick}>Item 1</Item>
  {asd === dsa && (
    <>
      <Item onClick={onMenuItemClick}>Item 2</Item>
      <Item onClick={onMenuItemClick}>Item 3</Item>
    </>
  )}
</Menu>

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
enomadocommented, Jun 9, 2021

I have same the problem. Any progress?

0reactions
jorgerojas26commented, Apr 3, 2022

Any fix on this?

Also running into this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React loses props inside array - Stack Overflow
I'm using react-contexify for my project. ... const onClick = ({ event, ref, data, dataFromProvider }) => console.log(event); const MyAwesomeMenu ...
Read more >
How to use Props in React - Robin Wieruch
As you may have noticed, props are only passed from top to bottom in React application's component hierarchy. There is no way to...
Read more >
How passing props to component works in React
Master how to pass props (properties) to components in React with this useful beginner's guide, including demo code.
Read more >
How React Components Pass Data Between Each Other ...
How React Components Pass Data Between Each Other Using Props ... This article is for intermediate React learners. There are a lot of...
Read more >
ReactJS: Passing Props. Properties in React are immutable…
Properties in React are immutable, read-only objects used to pass ... Passing props to a rendering component is no different from that of ......
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