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 · SharpTS 572a2e31be0e

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

src/SharpTS.Gui.Sdk/GuiPackage/runtime.ts:258 at SharpTS revision 572a2e31be0e2a09be0138bc44501b34d6245b51.