Merge pull request #375 from PombaM/patch-1

Update react.md
This commit is contained in:
Rico Sta. Cruz 2018-01-24 18:02:13 +08:00 committed by GitHub
commit b75f1bcd18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 0 deletions

View File

@ -106,6 +106,23 @@ class Info extends React.Component {
}
}
```
As of React v16.2.0
```jsx
class Info extends React.Component {
render () {
const { avatar, username } = this.props
return <React.Fragment>
<UserAvatar src={avatar} />
<UserProfile username={username} />
</React.Fragment>
}
}
```
{: data-line="6,7"}
Nest components to separate concerns.