-
Notifications
You must be signed in to change notification settings - Fork 48.3k
React (Virtual) DOM Terminology doc updated #6856
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
Conversation
ES6 examples instead of React.createClass
|
||
Or you can define it as a function (but it will be a stateless `ReactComponent`): | ||
```javascript | ||
let MyComponent = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not const
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think thats the habit. Changed it 😄
@gustavovnicius updated the pull request. |
|
||
Or you can define it as a function (but it will be a stateless `ReactComponent`): | ||
```javascript | ||
const MyComponent = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change this to:
function MyComponent() {
return ...;
}
because the syntax es5 is likely more familiar to new users, and has better compatibility across browsers.
@gustavovnicius updated the pull request. |
Thanks! We removed this section in new docs because it was quite out of date. |
ES6 examples instead of React.createClass