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
constructor is not specified in any group, so it is considered as a custom method and the rule asks you to place it after componentWillUnount(the last lifecycle method).
I think I will update the default configuration to get:
constructor method
Lifecycle methods
Custom methods
render method
For now you can set up a custom configuration in your .eslintrc:
With
sort-comp
enabled and ES6 classes, the plugin reports thatconstructor
should be aftercomponentWillUnmount
. It should be an exception...Here's a simple example with the issue:
The text was updated successfully, but these errors were encountered: