ValueCodec
type ValueCodec<T> = object;Defined in: tanstack/core/built-in-parsers.ts:488
A value codec: structured data ⇄ opaque token. Structurally matches
xtandard’s CursorCodec<T> (from createCursorCodec), so a single codec —
with its own serializer/parser/encoder/decoder overrides — can back URL
state, pagination, and drizzle-cursor at once.
Must be synchronous: URL parsing runs during render/SSR. Use the sync
createCursorCodec variant (the async one is for non-render code paths).
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
Properties
Section titled “Properties”decode
Section titled “decode”decode: (token) => T;Defined in: tanstack/core/built-in-parsers.ts:490
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
token |
string |
Returns
Section titled “Returns”T
encode
Section titled “encode”encode: (data) => string;Defined in: tanstack/core/built-in-parsers.ts:489
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data |
T |
Returns
Section titled “Returns”string