@kayahr/signal
    Preparing search index...

    Interface EffectContext<Value>

    Callback context passed to an effect execution.

    interface EffectContext<Value> {
        previous: Value;
        onCleanup(cleanup: () => void): void;
    }

    Type Parameters

    • Value
    Index

    Properties

    Methods

    Properties

    previous: Value

    The previous effect result or the configured initial input.

    Methods

    • Registers cleanup work to run before the next effect execution and when the effect is disposed.

      Parameters

      • cleanup: () => void

        The cleanup callback.

      Returns void