(props)
| 4 | |
| 5 | export 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) { |
nothing calls this directly
no outgoing calls
no test coverage detected