Skip to content

Conversation

@uhyo
Copy link
Owner

@uhyo uhyo commented Jan 24, 2026

Summary

  • Add a new "Type Safety" page to the Learn section explaining how to access route params, state, and loader data in a type-safe manner
  • Cover two approaches: props (recommended) and hooks
  • Include practical code examples for each pattern
  • Add navigation entry in the Learn section sidebar and index overview

Test plan

  • Run pnpm --filter funstack-router-docs dev and navigate to /funstack-router/learn/type-safety
  • Verify page renders correctly with all sections and code examples
  • Verify navigation link appears in Learn section sidebar
  • Verify Learn index page shows the new entry
  • Run pnpm typecheck to ensure no TypeScript errors

🤖 Generated with Claude Code

Add a new "Type Safety" page to the Learn section covering:
- Accessing typed route params, loader data, and navigation state via props
- RouteComponentProps and RouteComponentPropsWithData type helpers
- Using routeState() for typed navigation state management
- Type-safe hooks (useRouteParams, useRouteState, useRouteData)
- Type extraction utilities (ExtractRouteParams, etc.)
- Comparison guide for choosing between props and hooks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@uhyo uhyo merged commit 50e81c8 into master Jan 24, 2026
1 check passed
@uhyo uhyo deleted the docs/learn-type-safety branch January 24, 2026 05:09
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.

2 participants