Skip to content

ReactiveSvc type

Home > @rimitive/react > ReactiveSvc

Minimal constraint for reactive services used with createHook. Behaviors can require more specific services - this is just the floor.

Signature:

type ReactiveSvc = {
signal: <T>(initialValue: T) => Writable<T>;
computed: <T>(fn: () => T) => Readable<T>;
effect: (fn: () => void | (() => void)) => () => void;
};

References: Writable, Readable