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

Method componentWillReceiveProps

src/Form.js:79–88  ·  view source on GitHub ↗
(nextProps)

Source from the content-addressed store, hash-verified

77 }
78
79 componentWillReceiveProps (nextProps) {
80 if (!deepEqual(this.props.data, nextProps.data)) {
81 this.setState({ data: nextProps.data });
82
83 // if data changed, clear validation
84 forEach(this.items, (item) => {
85 delete item.$validation;
86 });
87 }
88 }
89
90 validate () {
91 let success = true;

Callers

nothing calls this directly

Calls 2

forEachFunction · 0.90
deepEqualFunction · 0.85

Tested by

no test coverage detected