Skip to content

DisposeFunc

Defined in: function-types.ts:10

Disposer is a function that undoes or cleans up an effect, enhancement, or subscription. Commonly returned by SetupFunc functions (see createSetup, setup) to restore original state.

Disposer is a complement to a setup of some kind—whenever you initialize or enhance something, you should return a disposer to clean up.

Effects can also return disposers to clean up after themselves. See EffectFunc.

DisposeFunc(): void

Defined in: function-types.ts:10

Disposer is a function that undoes or cleans up an effect, enhancement, or subscription. Commonly returned by SetupFunc functions (see createSetup, setup) to restore original state.

Disposer is a complement to a setup of some kind—whenever you initialize or enhance something, you should return a disposer to clean up.

Effects can also return disposers to clean up after themselves. See EffectFunc.

void