Subscribes a React component to an SSignal value.
This hook uses React's useSyncExternalStore, making it suitable for concurrent
rendering while keeping React components in sync with monitor signals.
Pass a selector to subscribe to part of the value: the component re-renders only when
the selected value changes, compared with Object.is or the given isEqual. Use
shallowEqual when the selector builds a new object or array.
OptionalisEqual: EqualityFn<S>
Subscribes a React component to an
SSignalvalue.This hook uses React's
useSyncExternalStore, making it suitable for concurrent rendering while keeping React components in sync with monitor signals.Pass a
selectorto subscribe to part of the value: the component re-renders only when the selected value changes, compared withObject.isor the givenisEqual. Use shallowEqual when the selector builds a new object or array.