UNPKG

@empathyco/x-components

Version:
29 lines (17 loc) 807 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [useState](./x-components.usestate.md) ## useState() function Function which returns the requested state's properties as a dictionary. **Signature:** ```typescript export declare function useState<Module extends XModuleName, State = ExtractState<Module>>(module: Module): { [P in keyof State]: ComputedRef<State[P]>; }; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | module | Module | The [XModuleName](./x-components.xmodulename.md) of the getter. | **Returns:** { \[P in keyof State\]: ComputedRef&lt;State\[P\]&gt;; } A dictionary of computed state properties of the module.