- Summary
- This website demonstrates a technique for managing complex state within a browser using URLs, effectively mimicking JSON structures. It utilizes Next.js, React.js, and TailwindCSS. The core concept involves storing state data as query parameters in the URL, preserving data types and structure. A basic example component is provided showcasing “name,” “age,” “agree_to_terms,” and “tags,” with defined types (string, undefined, boolean, array). Reloading the page maintains the URL-stored state. The demo utilizes Next.js and react-router.
- Title
- state-in-url - store state in URL like in JSON, type-safe
- Description
- Store any user state in query parameters; imagine JSON in a browser URL, while keeping types and structure of data. For Next.js, React-router and pure JS
- Keywords
- state, form, name, string, client, tags, value, import, type, data, export, components, will, store, parameters, types, structure
- NS Lookup
- A 64.29.17.1, A 64.29.17.65
- Dates
-
Created 2026-03-09Updated 2026-03-09Summarized 2026-03-11
Query time: 342 ms