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

Function componentWillReceiveProps

src/Select.js:35–42  ·  view source on GitHub ↗
(nextProps)

Source from the content-addressed store, hash-verified

33 }
34
35 componentWillReceiveProps (nextProps) {
36 if (!deepEqual(nextProps.value, this.props.value)) {
37 this.setValue(nextProps.value);
38 }
39 if (!deepEqual(nextProps.data, this.props.data)) {
40 this.setState({ data: this.formatData(nextProps.data) });
41 }
42 }
43
44 componentWillUnmount () {
45 super.componentWillUnmount();

Callers

nothing calls this directly

Calls 3

deepEqualFunction · 0.85
setValueMethod · 0.45
formatDataMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…