Skip to content

add note about eslint:no-label #1009

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
wants to merge 1 commit into from
Closed

add note about eslint:no-label #1009

wants to merge 1 commit into from

Conversation

swyxio
Copy link
Contributor

@swyxio swyxio commented Jun 27, 2018

closes #1004

@reactjs-bot
Copy link

Deploy preview for reactjs ready!

Built with commit 1135d67

https://deploy-preview-1009--reactjs.netlify.com

@@ -76,6 +76,18 @@ handleSomething() {
}
```

One common pitfall when writing arrow functions is accidentally relying on labels and implicit returns:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would call this out as a 'rarely-used language feature called "labels"'

Copy link
Contributor Author

@swyxio swyxio Jun 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have strong feelings on this, whoever is merging or reviewing please feel free to change it or decide.

@rickhanlonii
Copy link
Member

Hey @swyxio, good to see you! Sorry we never reviewed this. Going to close since it's against the old docs site, but if you think this is still needed I think there are a few good places to mention this in the new docs. Will comment on the issue.

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

Successfully merging this pull request may close these issues.

Recommend eslint:no-label for functional setState
5 participants