一键导入
solid-router-alternative
Solid Router alternative routers: HashRouter for hash-based URLs, MemoryRouter for testing and in-memory navigation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Solid Router alternative routers: HashRouter for hash-based URLs, MemoryRouter for testing and in-memory navigation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
SolidJS advanced components: SuspenseList for coordinating multiple Suspense boundaries, NoHydration for skipping hydration of static content.
SolidJS advanced utilities: createRoot for manual disposal, createUniqueId for SSR-safe IDs, useTransition for batching async updates, observable for RxJS interop, modifyMutable for batch updates.
SolidJS control flow: Show for conditionals, Switch/Match for multiple conditions, For/Index for lists, Dynamic for dynamic components, Suspense for async data.
SolidJS advanced JSX attributes: @once for static values, attr:*/bool:*/prop:* for Web Components, textContent for text nodes, innerHTML for raw HTML.
SolidJS lifecycle: onMount for DOM access after mount, onCleanup for resource disposal, effect lifecycle management, component vs effect cleanup.
Core SolidJS primitives: signals use getter functions count(), components run once (no re-renders), effects track automatically, stores use direct property access, memos for computed values. Fine-grained reactivity means targeted DOM updates.
| name | solid-router-alternative |
| description | Solid Router alternative routers: HashRouter for hash-based URLs, MemoryRouter for testing and in-memory navigation. |
| metadata | {"globs":["**/*router*"]} |
Uses hash portion of URL for routing. Client-side only routing (hash not handled by server).
import { HashRouter, Route } from "@solidjs/router";
<HashRouter root={App}>
<Route path="/" component={Home} />
<Route path="/about" component={About} />
</HashRouter>
Use cases:
URL format: https://example.com/#/about
Keeps router history in memory. Doesn't interact with browser URL. Useful for testing.
import { MemoryRouter, Route } from "@solidjs/router";
<MemoryRouter root={App}>
<Route path="/" component={Home} />
<Route path="/about" component={About} />
</MemoryRouter>
Use cases:
Note: URL in address bar won't change, but router state changes.
HashRouter for legacy compatibility or client-only appsMemoryRouter for testing router behaviorRouter is preferred for most applications (uses pathname)