Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 490 Bytes

File metadata and controls

14 lines (10 loc) · 490 Bytes
title createRoot
function createRoot<T>(fn: (dispose: () => void) => T): T

Creates a new non-tracked owner scope that doesn't auto-dispose. This is useful for nested reactive scopes that you do not wish to release when the parent re-evaluates.

All Solid code should be wrapped in one of these top level as they ensure that all memory/computations are freed up. Normally you do not need to worry about this as createRoot is embedded into all render entry functions.