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.
<GameHostProvider>
An object with state, dispatch, serverUrl, and serverError.
state
dispatch
serverUrl
serverError
If used outside of a <GameHostProvider>.
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.