couch-kit
    Preparing search index...

    Type Alias InternalAction<S>

    InternalAction:
        | { payload: S; type: "__HYDRATE__" }
        | {
            payload: { avatar?: string; id: string; name: string };
            type: "__PLAYER_JOINED__";
        }
        | { payload: { playerId: string }; type: "__PLAYER_LEFT__" }
        | { payload: { playerId: string }; type: "__PLAYER_RECONNECTED__" }
        | { payload: { playerId: string }; type: "__PLAYER_REMOVED__" }

    Internal actions managed automatically by createGameReducer. These are dispatched by the framework -- consumers do not need to handle them.

    • __HYDRATE__ -- Replaces state wholesale (server-to-client sync).
    • __PLAYER_JOINED__ -- Adds a player to state.players.
    • __PLAYER_LEFT__ -- Marks a player as disconnected (connected: false).
    • __PLAYER_RECONNECTED__ -- Restores a returning player (connected: true), preserving existing data.
    • __PLAYER_REMOVED__ -- Permanently removes a timed-out disconnected player from state.players.

    Type Parameters