@rbxts/pretty-react-hooks
Version:
Useful hooks for @rbxts/react
12 lines (11 loc) • 455 B
TypeScript
/**
* Returns the lifetime of the component in seconds. Updates every frame on
* the Heartbeat event.
*
* If the dependency array is provided, the lifetime timer will reset when
* any of the dependencies change.
*
* @param dependencies An optional array of dependencies to reset the timer.
* @returns A binding of the component's lifetime.
*/
export declare function useLifetime(dependencies?: unknown[]): import("@rbxts/react").Binding<number>;