react.useReactive
useReactive<T>(target): T
React hook that subscribes the host component to changes in a reactive target object or store.
| Name | Type | Description |
|---|---|---|
T |
extends object |
The type of reactive target object or domain store. |
| Name | Type | Description |
|---|---|---|
target |
T |
The reactive object, domain model, or signal container to observe. |
T
The same reactive target object reference.
Remarks
Whenever properties of the passed reactive object are accessed and mutated, this hook triggers a component re-render.
Example