Skip to main content

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

PropertiesTypeDescription
namestringThe name of the signal. It must be unique.