@empathyco/x-components
Version:
Empathy X Components
28 lines (16 loc) • 821 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [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, Path extends keyof ExtractState<Module> & string>(module: Module, paths: Path[]): Dictionary<ComputedRef>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| module | Module | The [XModuleName](./x-components.xmodulename.md) of the getter. |
| paths | Path\[\] | List of state paths. |
**Returns:**
Dictionary<ComputedRef>
The requested state properties of the module.