@adobe/data - v0.10.30
    Preparing search index...

    Function createState

    • Creates a simple state observe function and a setValue function to update the value. When observed, the current state if any will be immediately and synchronously sent to the observer callback.

      Type Parameters

      • T

      Parameters

      • OptionalinitialValue: T

        The initial value of the state.

      Returns [Observe<T>, (value: T) => void]