MCPcopy
hub / github.com/facebook/react / componentDidUpdate

Method componentDidUpdate

packages/react-art/src/ReactART.js:98–113  ·  view source on GitHub ↗
(prevProps, prevState)

Source from the content-addressed store, hash-verified

96 }
97
98 componentDidUpdate(prevProps, prevState) {
99 const props = this.props;
100
101 if (props.height !== prevProps.height || props.width !== prevProps.width) {
102 this._surface.resize(+props.width, +props.height);
103 }
104
105 // We synchronously flush updates coming from above so that they commit together
106 // and so that refs resolve before the parent life cycles.
107 updateContainerSync(this.props.children, this._mountNode, this);
108 flushSyncWork();
109
110 if (this._surface.render) {
111 this._surface.render();
112 }
113 }
114
115 componentWillUnmount() {
116 // We synchronously flush updates coming from above so that they commit together

Callers

nothing calls this directly

Calls 3

updateContainerSyncFunction · 0.90
renderMethod · 0.65
flushSyncWorkFunction · 0.50

Tested by

no test coverage detected