useSignal
This hook takes the name of the signal as a parameter and returns the state contained inside that signal.
const products = useSignal("product");
info
If you want to get actions (methods that allow you to modify the state), use the useAction hook instead.
Structure
Properties | Type | Description |
---|---|---|
name | string | The name of the signal. It must be unique. |