@dbcdk/nextjs-utils
v0.0.1
Published
Next.js App Router helpers for URL param and cookie state hydration
Maintainers
Readme
@dbcdk/nextjs-utils
Next.js App Router helpers for URL param and cookie state hydration, shared across DBC's Next.js projects.
Why
Several projects (dataio-frontend-v2, introspect-platform, and others) each hand-roll the same subtle
pattern: syncing state to the URL, falling back to a cookie, resolving both server-side before first paint,
and avoiding redirect loops and update races along the way. This package centralizes that logic instead of
letting it drift five different ways.
Status
Early scaffold — no exports yet. See the package's subpath layout below for where things will land.
Install
npm install @dbcdk/nextjs-utilsExports
@dbcdk/nextjs-utils— isomorphic helpers (no"use client"/server-only constraints).@dbcdk/nextjs-utils/client— client components/hooks ("use client").@dbcdk/nextjs-utils/server— server-only helpers (guarded byserver-only, usenext/headers).
Development
npm install
npm run build
npm test