@kayahr/signal

    Function atomic

    • Executes the given function as an atomic operation. During the function execution, signal observer notifications are paused until the function has been completed. This is useful to update multiple dependencies at once without triggering connected effects or re-calculating observed computed values multiple times.

      Atomic operations can be nested.

      Type Parameters

      • T

      Parameters

      • fn: () => T

        The function to call as an atomic operation.

      Returns T

    MMNEPVFCICPMFPCPTTAAATR