solid-router

Configure client-side routing and data management in SolidJS applications.

2|2|Updated May 1, 2026
One-click install
npx skills add https://github.com/adamhjk/mvtt --skill solid-router-adamhjk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solid-router
Source: https://github.com/adamhjk/mvtt/tree/main/.claude/skills/solid-router
Command: npx skills add https://github.com/adamhjk/mvtt --skill solid-router-adamhjk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @solidjs/router, and includes references (resource) components.

What problem does it solve?

This Skill streamlines the implementation of client-side and universal routing in SolidJS applications, making navigation and data management seamless.

Core Features & Use Cases

  • Routing Setup: Declare nested and dynamic routes with <Router> and <Route>, supporting route parameters, wildcards, and route groups.
  • Navigation & Redirects: Use <A>, useNavigate(), and <Navigate> for programmatic and declarative navigation, including route guards and protected routes.
  • Data Handling: Employ query, createAsync, and action APIs for efficient data fetching, caching, mutations, and revalidation, suitable for SPAs and SSR.
  • Preloading & Lazy Loading: Preload routes on hover or focus, and load routes lazily with lazy(), enhancing performance and user experience.

Quick Start

Wrap your app with <Router> and define <Route> components for your pages, then navigate using <A> or imperative functions to build a smooth, interactive UI.

Frequently Asked Questions about solid-router

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up nested and dynamic routes in a SolidJS application?

To set up nested and dynamic routing in SolidJS, wrap your application with the `<Router>` component and declare page structures using `<Route>`, supporting parameters, wildcards, and route groups for seamless navigation.

What is the best way to fetch and cache data during SolidJS navigation?

The best way to fetch and cache data during SolidJS navigation is using the query, createAsync, and action APIs, which handle data management, mutations, and revalidation efficiently across SPA and SSR contexts.

Does the @solidjs/router package support server-side rendering and protected routes?

Yes, the @solidjs/router package supports universal routing across both SPA and SSR contexts, and enables protected routes through declarative navigation components like `<Navigate>` and programmatic route guards.

Can I preload routes and lazy load components to improve SolidJS web app performance?

Yes, you can preload routes on hover or focus and load route components lazily using the `lazy()` function, which defers resource loading to enhance overall application performance and user experience.

How do I handle programmatic navigation and redirects in SolidJS?

You handle programmatic navigation and redirects in SolidJS by utilizing the `useNavigate()` function for imperative routing and the `<Navigate>` component for declarative redirects, alongside the `<A>` component for standard links.

Why do I need a router package for SolidJS instead of standard browser navigation?

You need a router package for SolidJS to enable client-side routing, which prevents full page reloads during navigation, manages dynamic data fetching, and handles nested route structures efficiently without losing application state.