Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,3 @@ The router uses two React contexts:
### Testing

Tests run in jsdom with `urlpattern-polyfill` (Navigation API is not available, so tests mock navigation behavior via `packages/router/src/__tests__/setup.ts`).

## Development Guidelines

### Documentation Updates

When adding a new feature to the router, you must also update the documentation in `packages/docs` to reflect the changes. This ensures users can discover and learn how to use new functionality.
12 changes: 12 additions & 0 deletions packages/docs/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { ApiComponentsPage } from "./pages/ApiComponentsPage.js";
import { ApiHooksPage } from "./pages/ApiHooksPage.js";
import { ApiUtilitiesPage } from "./pages/ApiUtilitiesPage.js";
import { ApiTypesPage } from "./pages/ApiTypesPage.js";
import { LearnPage } from "./pages/LearnPage.js";
import { LearnNestedRoutesPage } from "./pages/LearnNestedRoutesPage.js";
import { ExamplesPage } from "./pages/ExamplesPage.js";
import { useEffect } from "react";

Expand All @@ -23,6 +25,16 @@ const routes = [
path: "/getting-started",
component: GettingStartedPage,
}),
route({
path: "/learn",
component: LearnPage,
children: [
route({
path: "/nested-routes",
component: LearnNestedRoutesPage,
}),
],
}),
route({
path: "/api",
component: ApiReferencePage,
Expand Down
5 changes: 5 additions & 0 deletions packages/docs/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Outlet, useLocation } from "@funstack/router";
const navItems = [
{ path: "/funstack-router/", label: "Home" },
{ path: "/funstack-router/getting-started", label: "Getting Started" },
{ path: "/funstack-router/learn", label: "Learn" },
{ path: "/funstack-router/api", label: "API Reference" },
{ path: "/funstack-router/examples", label: "Examples" },
];
Expand All @@ -17,6 +18,10 @@ export function Layout() {
if (path === "/funstack-router/api") {
return location.pathname.startsWith("/funstack-router/api");
}
// Handle Learn section (match any /learn/* path)
if (path === "/funstack-router/learn") {
return location.pathname.startsWith("/funstack-router/learn");
}
// Handle home path
if (path === "/funstack-router/") {
return (
Expand Down
Loading