Lobbies · Search params & storage
14 modules · 73 exports · 2 repositories · 67 e2e tests · 3 routes
The state Lobbies keeps in the URL and in the browser's storage. Every param has a default and never fails to decode, see Search params, and each definition should have an assertRoundTrips test. The definitions of the whole app are listed in the reference.
Search params
URL lobbiesSearchParams
app/features/lobbies/lobbies-search-params.ts:7
| Param | Value | Default | Loader | Description |
|---|---|---|---|---|
tab | v.nullable(v.picklist(LOBBY_INDEX_TABS)) | null | false | null = the tab with the viewer's own lobby, or else the first non-empty one |
Used in lobbies.tsx
URL lobbySearchParams
app/features/lobbies/lobbies-search-params.ts:12
| Param | Value | Default | Loader | Description |
|---|---|---|---|---|
key | v.nullable(v.pipe(v.string(), v.length(SHORT_NANOID_LENGTH))) | null | true | Share key of a link-only lobby, letting those not participating see it |
Used in lobbies.$id.server.tslobbies.$id.server.tslobbies-utils.ts
URL newLobbySearchParams
app/features/lobbies/lobbies-search-params.ts:19
| Param | Value | Default | Loader | Description |
|---|---|---|---|---|
lobbyId | v.nullable(v.pipe(v.number(), v.integer(), v.gtValue(0))) | null | true | The lobby the host is editing, null = making a new one |