solidjs

📁 g1joshi/agent-skills 📅 3 days ago
1
总安装量
1
周安装量
#45006
全站排名
安装命令
npx skills add https://github.com/g1joshi/agent-skills --skill solidjs

Agent 安装分布

mcpjam 1
claude-code 1
replit 1
junie 1
zencoder 1

Skill 文档

SolidJS

SolidJS looks like React but has no Virtual DOM. It compiles to direct DOM updates using fine-grained reactivity (Signals). 2025 focuses on SolidStart (meta-framework).

When to Use

  • Performance: Consistently tops benchmarks.
  • Real-time: Fine-grained updates make it ideal for dashboards.
  • Mental Model: If you prefer “it only runs once” components vs React’s re-renders.

Core Concepts

Signals (createSignal)

The atom of state. const [count, setCount] = createSignal(0).

Effects (createEffect)

Runs when dependencies change. Automatic dependency tracking.

Show / For

Control flow components (<Show when={...}>) instead of map.

Best Practices (2025)

Do:

  • Use createResource: For async data fetching.
  • Access signals as functions: count() not count.
  • Use SolidStart: For file-system routing and SSR.

Don’t:

  • Don’t destructure props: Reactivity is lost if you destructure props.

References