solid-impl-routing

Configure @solidjs/router setups with nested routes and route guards.

4|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/OpenAEC-Foundation/SolidJS-Claude-Skill-Package --skill solid-impl-routing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solid-impl-routing
Source: https://github.com/OpenAEC-Foundation/SolidJS-Claude-Skill-Package/tree/main/skills/source/solid-impl/solid-impl-routing
Command: npx skills add https://github.com/OpenAEC-Foundation/SolidJS-Claude-Skill-Package --skill solid-impl-routing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Complex SolidJS routing setups are error-prone and easy to misapply, leading to broken navigation, stale parameters, and poor user experience. This Skill provides a comprehensive guide with correct patterns, anti-patterns, and practical examples for implementing Router/HashRouter, nested routes, guards, lazy loading, and preloading in SolidJS.

Core Features & Use Cases

  • ClearRouter setup for single-page SolidJS apps with proper layout and nested routes
  • Guarded navigation and route guards to prevent unsaved changes or unauthorized access
  • Lazy loading and preloading of routes to optimize performance and UX
  • Real-world examples covering dynamic parameters, query strings, and nested route architecture

Quick Start

Configure a new SolidJS project with @solidjs/router and implement a basic two-route setup to demonstrate proper routing patterns.

Frequently Asked Questions about solid-impl-routing

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

FAQPage Schema
How do I set up nested routes in SolidJS without breaking navigation?

Nested routes in SolidJS require defining parent and child route components within the Router configuration to avoid broken navigation. Using structured config-based routing ensures proper layout rendering and prevents stale parameters during client-side navigation.

What's the best way to implement route guards for SolidJS applications using useBeforeLeave?

Route guards in SolidJS utilize the useBeforeLeave hook to intercept navigation and prevent unauthorized access or unsaved data loss. This mechanism checks routing conditions before transitions, ensuring safe guarded navigation across the application.

Can I use React Router patterns directly with @solidjs/router?

React Router patterns cause stale parameters and broken navigation when applied to @solidjs/router. SolidJS requires distinct navigation patterns using A components and useNavigate to ensure robust client-side routing without React-pattern pitfalls.

How do I optimize SolidJS routing performance with lazy loading and preloading?

Optimizing SolidJS routing performance involves implementing lazy loading and route preloading to split code bundles. This approach loads route components on demand or ahead of time, improving application load times and user experience.

Why does my SolidJS application have stale route parameters after navigation?

Stale route parameters in SolidJS occur when React navigation patterns are misapplied to @solidjs/router. Using SolidJS-specific hooks like useParams and useSearchParams ensures dynamic parameters and query strings remain synchronized during navigation.

Does @solidjs/router support HashRouter setups for single-page applications?

@solidjs/router supports both Router and HashRouter setups for SolidJS single-page applications. Config-based routing enables declarative route definitions, allowing flexible architecture for dynamic parameters and nested route layouts.