@rbxts/planck-flamecs-hooks
Version:
A @rbxts/planck plugin that provides support for @rbxts/flamecs hooks.
11 lines (10 loc) • 496 B
TypeScript
import { Modding } from "@flamework/core";
/**
*
* @param initialValue - The initial value of the state.
* @param discriminator - An optional value to additionally key by.
* @param key - An automatically generated key to store the state.
* @returns A tuple containing the current state value and a function to update it.
* @metadata macro
*/
export declare function useState<T>(initialValue: T, discriminator?: unknown, key?: Modding.Caller<"uuid">): LuaTuple<[T, (newValue: T) => void]>;