MCPcopy
hub / github.com/kenberkeley/react-demo / constructor

Function constructor

src/components/Msg/MsgList/DisplayControl.js:6–10  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

4
5export default class DisplayControl extends Component {
6 constructor (props) {
7 super(props)
8 this.state = { _quantity: props.quantity }
9 this.handleChange = handleChange.bind(this) // mixin
10 }
11
12 /* 【拓展阅读】setState 的“异步”坑:https://zhuanlan.zhihu.com/p/20328570 */
13 componentWillReceiveProps(nextProps) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected