MCPcopy Create free account
hub / github.com/ElemeFE/element-react / componentWillReceiveProps

Method componentWillReceiveProps

src/tree/Tree.jsx:33–38  ·  view source on GitHub ↗
(nextProps: Object)

Source from the content-addressed store, hash-verified

31 }
32
33 componentWillReceiveProps(nextProps: Object): void {
34 if (nextProps.data instanceof Array && this.props.data !== nextProps.data) {
35 this.root.setData(nextProps.data);
36 this.setState({}); //force update
37 }
38 }
39
40
41 get root(): any{

Callers

nothing calls this directly

Calls 1

setDataMethod · 0.45

Tested by

no test coverage detected