Update react.md

This commit is contained in:
pombam 2018-01-24 12:45:35 +05:45 committed by GitHub
parent 6f21603bb7
commit 520458e943
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"} {: data-line="6,7"}
Nest components to separate concerns. Nest components to separate concerns.