Skip to content

A "class"/ "React.createClass" component with no state/refs/lifecycle methods should be stateless #405

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

Closed
ljharb opened this issue Jan 22, 2016 · 1 comment

Comments

@ljharb
Copy link
Member

ljharb commented Jan 22, 2016

Feature request! Per airbnb/javascript#612 (comment), it'd be great if a component that does not reference this.state or this.refs (including { state } = this/ { refs } = this/var foo = this; foo.state etc), and that has no lifecycle methods, should instead be a functional stateless component.

@yannickcr
Copy link
Member

Duplicate of #214, but yes it could be a very useful rule, I need to work on it.

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

No branches or pull requests

2 participants