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

Method componentWillReceiveProps

src/CheckboxGroup.js:24–31  ·  view source on GitHub ↗
(nextProps)

Source from the content-addressed store, hash-verified

22 }
23
24 componentWillReceiveProps (nextProps) {
25 if (!deepEqual(nextProps.value, this.props.value)) {
26 this.setValue(nextProps.value);
27 }
28 if (!deepEqual(nextProps.data, this.props.data)) {
29 this.setState({ data: this.formatData(nextProps.data) });
30 }
31 }
32
33 setValue (value) {
34 value = toArray(value, this.props.sep);

Callers

nothing calls this directly

Calls 3

setValueMethod · 0.95
formatDataMethod · 0.95
deepEqualFunction · 0.85

Tested by

no test coverage detected