Props not passed when Items inside intermediary component
See original GitHub issueHi! 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:
- Created 4 years ago
- Reactions:7
- Comments:6 (1 by maintainers)
Top 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 >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 FreeTop 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
Top GitHub Comments
I have same the problem. Any progress?
Any fix on this?
Also running into this issue.