componentWillMount(): Assigning directly to this.state is deprecated
Open
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
Use react-mixin with react@16.0.0-beta.3 (maybe also in 15.6.x) will output warning:
Warning: XComponent.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.
Seems https://github.com/brigand/react-mixin/blob/master/index.js#L37-L45 calls `applyInitialState`, and `applyInitialState` at https://github.com/brigand/react-mixin/blob/master/index.js#L30 calls `instance.state = ...`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.