Creates an effect scope that groups multiple reactive effects for lifecycle management.
The return type of the callback.
A function where effects can be created. All effects created within will be scoped.
A stop function to cancel all effects within the scope.
const stopScope = createSignalScope(() => { createEffect(() => { console.log('Scoped effect'); });});// Later, stop all scoped effects:stopScope(); Copy
const stopScope = createSignalScope(() => { createEffect(() => { console.log('Scoped effect'); });});// Later, stop all scoped effects:stopScope();
Creates an effect scope that groups multiple reactive effects for lifecycle management.