Documentation
On this page

Function · Hooks and State

useEffect

Runs an effect after the native tree commits and cleans it up before rerun or unmount.

@sharpts/gui 0.0.0-local · SharpTS 7c6010104a43

Signature

TypeScript
useEffect(effect: () => any, deps?: readonly unknown[]): void

Parameters

NameTypeDescription
effect() => anyEffect callback, optionally returning a cleanup callback.
deps optionalreadonly unknown[]Optional dependency values controlling reruns.

Source

SharpTS.Gui.Sdk/GuiPackage/runtime.ts:258 at SharpTS revision 7c6010104a43c34d80e9d44704cf179bc4f5b8e0.