MCPcopy Index your code
hub / github.com/Lobos/react-ui / shouldComponentUpdate

Method shouldComponentUpdate

src/FormControl.js:46–62  ·  view source on GitHub ↗
(nextProps, nextState)

Source from the content-addressed store, hash-verified

44 }
45
46 shouldComponentUpdate (nextProps, nextState) {
47 if (!shallowEqual(this.props, nextProps)) {
48 return true;
49 }
50
51 if (nextProps.formData) {
52 let keys = Object.keys(this.items);
53 for (let i=0, key; i<keys.length; i++) {
54 key = keys[i];
55 if (nextProps.formData[key] !== this.items[key].$value) {
56 return true;
57 }
58 }
59 }
60
61 return !shallowEqual(this.state, nextState);
62 }
63
64 itemBind (props) {
65 this.items[props.id] = props;

Callers

nothing calls this directly

Calls 1

shallowEqualFunction · 0.90

Tested by

no test coverage detected