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
Which is odd, because someProp is definitely in propTypes. A work-around to satisfy the linter is to store the prop in a variable outside subRender the function:
I think this is either a bug in how the linter is checking for prop types, or, if the latter example is a preferred style, the message should be clearer about what's wrong here.
The text was updated successfully, but these errors were encountered:
For a sateless component that looks like this:
eslint throws:
Which is odd, because
someProp
is definitely inpropTypes
. A work-around to satisfy the linter is to store the prop in a variable outsidesubRender
the function:Or, add the
subRender
method as an instance method of statelessComponent and don't useprops
for the argument:I think this is either a bug in how the linter is checking for prop types, or, if the latter example is a preferred style, the message should be clearer about what's wrong here.
The text was updated successfully, but these errors were encountered: