Skip to content

Feed · Search params & storage

15 modules · 52 exports · 5 repositories · 3 e2e tests · 1 route

The state Feed 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 feedSearchParams

app/features/feed/feed-search-params.ts:13

ParamValueDefaultLoaderDescription
tab v.nullable(v.picklist(FEED_TABS))nullfalse

Feed filter, all posts when null

viewAs v.nullable(userId)nulltrue

Dev only: whose feed is shown

test v.boolean()falsetrue

Dev only: shows every item type with mock data instead of the real feed

sharedBy v.nullable(userId)nulltrue

Share link: whose feed the post is from, valid only with token

token v.nullable(v.pipe(v.string(), v.maxLength(64)))nulltrue

Used in Feed.tsxfeed-urls.tsfeed.$id.server.tsfeed-sources.tsxfeed.$id.tsxindex.server.tsindex.tsx