Skip to content

Upgrade dependencies and route pages with react-router - #61

Merged
chelproc merged 1 commit into
mainfrom
upgrade-deps-react-router
Oct 24, 2026
Merged

chelproc merged 1 commit into
mainfrom
upgrade-deps-react-router

Conversation

@chelproc

Copy link
Copy Markdown
Contributor

Bumps all dependencies to their latest versions and replaces the component selection kept in App state with react-router.

Dependency upgrade

  • All dependencies are bumped, including TypeScript 7, Vite 8, Vitest 5 and Biome 2.5.
  • TypeScript 7 no longer accepts the Node module resolution, so tsconfig.json switches to bundler.
  • biome.json is migrated to the 2.5.15 schema with biome migrate, since the CLI reports a version mismatch otherwise.

Routing

  • App is now a layout route (global header + <Outlet />) around two pages:
    • / → HomePage
    • /components/:componentId → EditPage
  • With the edited component in the URL, it survives a reload and can be linked to.
  • HomePage links each card to its edit page and navigates to a newly created component. EditPage reads the ID from the URL and navigates when the editor asks to open another component or to close.
  • If the component ID is unknown, the app redirects to / with replace, so Back does not return to the broken URL.
  • CCComponentEditor is keyed by the component ID. ComponentEditorStoreProvider creates its store once per mount, so without the key the editor kept the previous component's store after navigating from one component to another. This was already the case before this PR, but URL navigation and Back make it much easier to hit.

Verification

  • npm run type-check, npm run check, npm test and npm run build pass.
  • Not yet checked in a browser.

Bump all dependencies to their latest versions, including TypeScript 7,
Vite 8, Vitest 5 and Biome 2.5. TypeScript 7 no longer accepts the
`Node` module resolution, so it is switched to `bundler`, and the Biome
configuration is migrated to the new schema.

Replace the component selection kept in App state with react-router.
App is now the layout route around the home page at `/` and the edit
page at `/components/:componentId`, so the edited component survives a
reload and can be linked to. An unknown component ID redirects to the
home page. The editor is keyed by the component ID, since its store is
created once per mount and would otherwise keep showing the previous
component after navigating to another one.
@chelproc
chelproc merged commit 34b3e3b into main Oct 24, 2026
2 checks passed
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