Chok’s React Utilities
    Preparing search index...

    Function useSharedState

    • React hook for subscribing to a key in the global store.

      Example:

        const [counter, setCounter] = useSharedState(counterState);
      

      Type Parameters

      • T

      Parameters

      Returns [T, Dispatch<SetStateAction<T>>]