You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues and my issue is unique
My issue appears in the command-line and not only in the text editor
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
Description Overview
The react/jsx-key rule fails to detect missing key props when JSX elements are conditionally rendered using the logical operators within return statements.
Code example
constlist=[1,2,3,4,5,6];functionItem({ item }){return<p>{item}</p>;}functionApp(){return(<div>{list.map((item)=>{returnitem<4&&<Itemitem={item}/>;// Missing key prop not detected})}</div>);}exportdefaultApp;
Expected Behavior
The rule should detect and report the missing key prop error.
changed the title [-][Bug]: react/jsx-key rule doesn't detect missing keys in LogicalExpression with `&&` operator in return statements[/-][+][Bug]: react/jsx-key rule doesn't detect missing keys in LogicalExpression in return statements[/+]on Jun 6, 2025
Activity
[-][Bug]: react/jsx-key rule doesn't detect missing keys in LogicalExpression with `&&` operator in return statements[/-][+][Bug]: react/jsx-key rule doesn't detect missing keys in LogicalExpression in return statements[/+]Dorianspeed commentedon Jun 25, 2025
Hi there!
I think it's probably a duplicate of #3925 ?