A signal holding a value

Type Parameters

  • T = any

Hierarchy

Properties

Methods

Properties

value: T

The value of the signal.

Accessing the value within render, effect, computed or subscribe will automatically call the respective function again when the signal value is updated.

Methods

  • Access the signal value without subscribing to updates

    Returns T

  • Subscribe to signal updates

    Parameters

    • callback: ((value: T) => void)

      function to invoke when the signal value is updated

        • (value: T): void
        • Parameters

          • value: T

          Returns void

    Returns (() => void)

      • (): void
      • Subscribe to signal updates

        Returns void