I found that the signal public interface (SignalLike) is not actually used at runtime, but only for types. Under the hood, @preact/signals patches the runtime and does all the subscription and invalidation mechanics by itself based on its internal knowledge.
It would be awesome to support a signal version of React's useSyncExternalStore hook as a general interface for other state manager adapters.
I found that the signal public interface (
SignalLike
) is not actually used at runtime, but only for types. Under the hood,@preact/signals
patches the runtime and does all the subscription and invalidation mechanics by itself based on its internal knowledge.It would be awesome to support a signal version of React's
useSyncExternalStore
hook as a general interface for other state manager adapters.