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
That's a good point - that's a core rule that prevents use of this in a standalone function. It still might be useful to have one specifically for SFCs, though.
That rule allows this if the function looks like a constructor, and the criteria for that is the name is capitalized or is actually a class constructor. Since SFCs begin with capital letter then that rule would allow it.
One possible solution is to add-on to that rule by determining if the function is a SFC.
The criteria for that could be something similar to:
Would be great to catch these errors faster especially when converting classes to stateless functions
The text was updated successfully, but these errors were encountered: