couch-kit
    Preparing search index...

    Function useGameHost

    • React hook to access the game host context.

      Must be used within a <GameHostProvider>. Returns the canonical game state, a dispatch function for actions, the server URL (for QR codes), and any server startup errors.

      Type Parameters

      Returns GameHostContextValue<S, A>

      An object with state, dispatch, serverUrl, and serverError.

      If used outside of a <GameHostProvider>.