Plus voting · Search params & storage
1 module · 2 exports · 1 repository · 3 e2e tests · 3 routes
The state Plus voting 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.
Web storage
localStorage plusVotingPersisted
app/features/plus-voting/plus-voting-persisted.ts:5
Votes given so far in the ongoing voting, so a reload continues where the user left off
| Key | plusVoting |
|---|---|
| Value | v.nullable( v.object({ month: v.number(), year: v.number(), votes: v.array(v.object({ votedId: v.number(), score: v.number() })), /** User id -> order for sorting */ usersForVotingOrder: v.record(v.string(), v.number()), }), ) |
| Default | null |
Used in usePlusVoting.ts