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

add note about eslint:no-label #1009

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

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.

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
4 participants