MCPcopy Create free account
hub / github.com/docker/getting-started / componentWillReceiveProps

Function componentWillReceiveProps

app/src/static/js/react-bootstrap.js:7996–8006  ·  view source on GitHub ↗
(nextProps)

Source from the content-addressed store, hash-verified

7994}
7995
7996function componentWillReceiveProps(nextProps) {
7997 // Call this.constructor.gDSFP to support sub-classes.
7998 // Use the setState() updater to ensure state isn't stale in certain edge cases.
7999 function updater(prevState) {
8000 var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
8001 return state !== null && state !== undefined ? state : null;
8002 } // Binding "this" is important for shallow renderer support.
8003
8004
8005 this.setState(updater.bind(this));
8006}
8007
8008function componentWillUpdate(nextProps, nextState) {
8009 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…