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

Method componentWillReceiveProps

src/RadioGroup.js:33–40  ·  view source on GitHub ↗
(nextProps)

Source from the content-addressed store, hash-verified

31 }
32
33 componentWillReceiveProps (nextProps) {
34 if (nextProps.value !== this.props.value) {
35 this.setValue(nextProps.value);
36 }
37 if (!deepEqual(nextProps.data, this.props.data)) {
38 this.setState({ data: this.formatData(nextProps.data) });
39 }
40 }
41
42 formatData (data) {
43 data = toTextValue(data, this.props.textTpl, this.props.valueTpl);

Callers

nothing calls this directly

Calls 3

setValueMethod · 0.95
formatDataMethod · 0.95
deepEqualFunction · 0.85

Tested by

no test coverage detected