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
Somehow eslint thinks that the {foo} is a component prop:
'foo' is missing in props validation
It seems that the detection what actually is a prop is not precise enough. Because this warning/error can be avoided when I don't destruct the argument of the f function and instead access properties on it with the dot-notation:
functionf(x){x.foo...}
Or if I destruct the argument inside the function body:
functionf(x){const{foo}=p;}
All three definitions of the f function are semantically equivalent, but this eslint plugin treats them differently.
The text was updated successfully, but these errors were encountered:
Somehow eslint thinks that the
{foo}
is a component prop:It seems that the detection what actually is a prop is not precise enough. Because this warning/error can be avoided when I don't destruct the argument of the
f
function and instead access properties on it with the dot-notation:Or if I destruct the argument inside the function body:
All three definitions of the
f
function are semantically equivalent, but this eslint plugin treats them differently.The text was updated successfully, but these errors were encountered: