MCPcopy Create free account
hub / github.com/Lobos/react-ui / componentWillReceiveProps

Function componentWillReceiveProps

src/Tree/Tree.js:38–49  ·  view source on GitHub ↗
(nextProps)

Source from the content-addressed store, hash-verified

36 }
37
38 componentWillReceiveProps (nextProps) {
39 if (!deepEqual(nextProps.value, this.props.value)) {
40 this.setValue(nextProps.value);
41 }
42 if (!deepEqual(nextProps.data, this.props.data)) {
43 this.formatData(nextProps.data);
44 }
45 if (nextProps.sep !== this.props.sep ||
46 nextProps.greedy !== this.props.greedy) {
47 this.handleChange();
48 }
49 }
50
51 componentWillUpdate (nextProps, nextState) {
52 // initValue 和 initData 分开处理

Callers

nothing calls this directly

Calls 4

deepEqualFunction · 0.85
setValueMethod · 0.45
formatDataMethod · 0.45
handleChangeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…