FieldCodec
Describe a URL key, decode logic, default value, write-back behavior, and equality semantics with a single field.
Turn string, string[], and null into typed, maintainable, and reviewable business state with explicit decode pipelines.
Describe a URL key, decode logic, default value, write-back behavior, and equality semantics with a single field.
The hard part of URL search params is not writing values, but safely decoding raw URL strings into business values.
Search Fields describe URL fields and infer value types, so hooks, codecs, and business code share the same constraints.
When updating the URL, only encode the fields in the patch and preserve untouched params from the base search.
Expose search state as hooks in React Router applications, with support for optimistic URL updates.
Read legacy keys from old links and write back canonical keys, making URL field migrations smoother.