MCPcopy Create free account
hub / github.com/caseywebdev/react-list / getDerivedStateFromProps

Method getDerivedStateFromProps

src/react-list.js:106–109  ·  view source on GitHub ↗
(props, state)

Source from the content-addressed store, hash-verified

104 };
105
106 static getDerivedStateFromProps(props, state) {
107 const newState = constrain(props, state);
108 return newState === state ? null : newState;
109 }
110
111 constructor(props) {
112 super(props);

Callers

nothing calls this directly

Calls 1

constrainFunction · 0.70

Tested by

no test coverage detected