effex-monorepo
    Preparing search index...

    Interface Ref<A>

    A mutable reference that may not have a value yet. Similar to React's useRef but with Effect integration.

    interface Ref<A> {
        "[TypeId]": typeof TypeId;
        current: A | null;
        set: (value: A) => void;
        value: Effect<A>;
    }

    Type Parameters

    • A

      The type of value held by the ref

    Index

    Properties

    "[TypeId]": typeof TypeId
    current: A | null

    The current value, or null if not yet set

    set: (value: A) => void

    Set the value (also completes the deferred)

    value: Effect<A>

    Effect that resolves when the value is available