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
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.