Skip to content

Commit

Permalink
use functional component as a first example in readme (facebook#14819)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyraspopov authored and gaearon committed Feb 11, 2019
1 parent c11015f commit e15542e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ You can improve it by sending pull requests to [this repository](https://github.
We have several examples [on the website](https://reactjs.org/). Here is the first one to get you started:

```jsx
class HelloMessage extends React.Component {
render() {
return <div>Hello {this.props.name}</div>;
}
function HelloMessage({ name }) {
return <div>Hello {name}</div>;
}

ReactDOM.render(
Expand Down

0 comments on commit e15542e

Please sign in to comment.