Skip to content

Add useParams hook - #6

Merged
JoviDeCroock merged 3 commits into
mainfrom
JoviDeCroock/use-params
Apr 7, 2026
Merged

Add useParams hook#6
JoviDeCroock merged 3 commits into
mainfrom
JoviDeCroock/use-params

Conversation

@JoviDeCroock

Copy link
Copy Markdown
Owner

Summary

  • Adds a useParams() hook that reads route params from context, eliminating the need to prop-drill params from RouteComponentProps
  • Passes params through ViactRuntimeProvider on both client (router) and server (SSR) render paths
  • Returns {} as a safe default when used outside a route context

Test plan

  • Verify useParams() returns correct params on SSR and client navigation
  • Verify useParams() returns {} outside a route context
  • Run existing tests

JoviDeCroock and others added 3 commits April 7, 2026 23:44
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JoviDeCroock
JoviDeCroock merged commit 364bdbe into main Apr 7, 2026
1 check passed
@JoviDeCroock
JoviDeCroock deleted the JoviDeCroock/use-params branch April 8, 2026 00:36
JoviDeCroock added a commit that referenced this pull request Apr 18, 2026
drizzle-kit's migrate command can't talk to D1 (no TCP endpoint) — the
skill previously emitted db:migrate scripts that would silently fail on
D1 projects. Split Step 5/6/8/9 by provider:

- D1 drizzle.config.ts omits dbCredentials (generate-only), notes d1-http
  driver for studio.
- D1 scripts use wrangler d1 migrations apply, with --local and --remote
  variants so users can iterate against miniflare before touching prod.
- wrangler.toml binding gets migrations_dir matching drizzle's out path.
- Added rule #6 spelling out the D1 footgun.

Pattern mirrors the working setup in ~/Documents/SideProjects/Sarah/api.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
JoviDeCroock added a commit that referenced this pull request Apr 18, 2026
* fix(skills): correct accuracy bugs in five SKILL.md files

- audit-shells: ErrorBoundary is a route export, not a shell one; flag it
  as misplaced. Document shell headers() export too.
- audit-csrf: remove stray empty ```bash fence.
- tune-render-mode: add Edit to allowed-tools so §Step 4 can apply the
  recommended render-mode change.
- add-db: fix Node Postgres example — schema was imported after use.
- add-observability: defineApp({ middleware }) is a name→path registry,
  not an ordered chain; document that ordering lives in group/api
  middleware arrays.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(skills): branch add-db migrate workflow for Cloudflare D1

drizzle-kit's migrate command can't talk to D1 (no TCP endpoint) — the
skill previously emitted db:migrate scripts that would silently fail on
D1 projects. Split Step 5/6/8/9 by provider:

- D1 drizzle.config.ts omits dbCredentials (generate-only), notes d1-http
  driver for studio.
- D1 scripts use wrangler d1 migrations apply, with --local and --remote
  variants so users can iterate against miniflare before touching prod.
- wrangler.toml binding gets migrations_dir matching drizzle's out path.
- Added rule #6 spelling out the D1 footgun.

Pattern mirrors the working setup in ~/Documents/SideProjects/Sarah/api.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant