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

Method componentDidMount

packages/react-art/src/ReactART.js:74–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72
73class Surface extends React.Component {
74 componentDidMount() {
75 const {height, width} = this.props;
76
77 this._surface = Mode.Surface(+width, +height, this._tagRef);
78
79 this._mountNode = createContainer(
80 this._surface,
81 disableLegacyMode ? ConcurrentRoot : LegacyRoot,
82 null,
83 false,
84 false,
85 '',
86 defaultOnUncaughtError,
87 defaultOnCaughtError,
88 defaultOnRecoverableError,
89 defaultOnDefaultTransitionIndicator,
90 null,
91 );
92 // We synchronously flush updates coming from above so that they commit together
93 // and so that refs resolve before the parent life cycles.
94 updateContainerSync(this.props.children, this._mountNode, this);
95 flushSyncWork();
96 }
97
98 componentDidUpdate(prevProps, prevState) {
99 const props = this.props;

Callers

nothing calls this directly

Calls 3

createContainerFunction · 0.90
updateContainerSyncFunction · 0.90
flushSyncWorkFunction · 0.50

Tested by

no test coverage detected