useSignal
Callable
- useSignal<T>(value: T, opts?: SetSignalOptions): readonly [Signal<T>, SignalSetter<T, T>]
- useSignal<T>(value?: T, opts?: SetSignalOptions): readonly [Signal<undefined | T>, SignalSetter<undefined | T, undefined | T>]
Type parameters
- T
Creates a new signal with the given value.