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

Function stopSurface

packages/react-native-renderer/src/ReactFabric.js:179–190  ·  view source on GitHub ↗
(containerTag: number)

Source from the content-addressed store, hash-verified

177}
178
179function stopSurface(containerTag: number) {
180 const root = roots.get(containerTag);
181 if (root) {
182 // TODO: Is it safe to reset this now or should I wait since this unmount could be deferred?
183 updateContainer(null, root, null, () => {
184 // Remove the reference to the public instance to prevent memory leaks.
185 root.containerInfo.publicInstance = null;
186
187 roots.delete(containerTag);
188 });
189 }
190}
191
192function createPortal(
193 children: ReactNodeList,

Callers

nothing calls this directly

Calls 2

updateContainerFunction · 0.90
getMethod · 0.65

Tested by

no test coverage detected