brigand / brigand/react-mixin

componentWillMount(): Assigning directly to this.state is deprecated

Open
#52 7 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.