Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prefer-stateless-function] false position with this case #499

Closed
tleunen opened this issue Mar 14, 2016 · 4 comments
Closed

[prefer-stateless-function] false position with this case #499

tleunen opened this issue Mar 14, 2016 · 4 comments
Labels

Comments

@tleunen
Copy link

tleunen commented Mar 14, 2016

Most issues around prefer-stateless-function are fixed. Thanks a lot for that, but I'm still having a few cases when it's warning wrong classes.

For example, this one. The class has a constructor, but also componentDidMount and other lifecycles functions, so it should not be compatible with a SFC.
screen shot 2016-03-13 at 10 16 48 pm

@yannickcr
Copy link
Member

Did you test on master ? Since the fixed prefer-stateless-function is not yet released on npm.

@tleunen
Copy link
Author

tleunen commented Mar 14, 2016

Oh my bad, I thought it was on 4.2.1. Will retest on master and reopen if needed.

@tleunen tleunen closed this as completed Mar 14, 2016
@tleunen
Copy link
Author

tleunen commented Mar 14, 2016

@yannickcr I'm reopening, because I just tested with 4.2.2 and I still have the issue.

Here's a quick small example:
screen shot 2016-03-14 at 7 52 18 pm

Looks like the error is not reported only when this is used.

@tleunen tleunen reopened this Mar 14, 2016
@yannickcr
Copy link
Member

Ok, there is a small bug on how we retrieve the class properties, so we do not catch componentDidMount. I will publish a patch release tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants