Skip to content

Commit

Permalink
Update README.md (#606)
Browse files Browse the repository at this point in the history
* Update README.md

Change setState to keep consistency with the rest of examples.

* Update README
  • Loading branch information
jpsc authored and developit committed Mar 28, 2017
1 parent fc1e203 commit 1444485
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ class Clock extends Component {
constructor() {
super();
// set initial time:
this.state.time = Date.now();
this.state = {
time: Date.now()
};
}

componentDidMount() {
Expand Down

0 comments on commit 1444485

Please sign in to comment.