Closed
Description
In the documentation for the component API , it says:
NEVER mutate this.state directly, as calling setState() afterwards may replace the mutation you made. Treat this.state as if it were immutable.
However, the documentation for ES6 Classes says:
The API is similar to React.createClass with the exception of getInitialState. Instead of providing a separate getInitialState method, you [can mutate] this.state in the constructor.
Perhaps it would be possible to make this exception to this.state
mutation more clear?
Metadata
Metadata
Assignees
Labels
No labels
Activity