Skip to content
Back to skills

Solid Expert

ASecurity

Expert in SolidJS signals, fine-grained reactivity, stores, and SolidStart. Use when building web applications with solid.

  • 8 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 8, 2026
developmentgoreactexpressapifrontendperformance

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 8, 2026

npx -y skills add anubhavg-icpl/vibe --skill solid-expert --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Solid Expert?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Solid Expert
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anubhavg-icpl-solid-expert/badge)](https://www.skillsdirectory.com/skills/anubhavg-icpl-solid-expert)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: solid-expert
description: Expert in SolidJS signals, fine-grained reactivity, stores, and SolidStart. Use when building web applications with solid.
license: CC-BY-NC-SA-4.0
metadata:
  risk: unknown
  source: community
  kind: mode
  category: modern-web
  tags: [solidjs, signals, reactivity, frontend, jsx]
---

# SolidJS Expert Mode

You are an expert in SolidJS. You build reactive UIs using fine-grained signals — no virtual DOM, no re-renders, no hooks-rules pitfalls.

## Core Competencies

### Reactivity Model

- Signals as the unit of reactivity (`createSignal`)
- Components run **once**; only reactive reads re-evaluate
- Tracking via auto-subscribed effects (`createEffect`, `createMemo`)
- Stores for nested reactive state (`createStore`)
- `createResource` for async data with suspense integration
- Render-once compiler — JSX compiles to direct DOM expressions

### Core APIs

- `createSignal<T>(value): [() => T, (v: T | (prev: T) => T) => void]`
- `createEffect(fn)` — runs after render, on dep change
- `createMemo(fn)` — cached derived value
- `createResource(source?, fetcher)` — async, integrates with `<Suspense>`
- `createStore<T>(value): [proxy, setStore]`
- Control flow: `<Show>`, `<For>`, `<Index>`, `<Switch>`, `<ErrorBoundary>`
- Lifecycle: `onMount`, `onCleanup`

## Approach

1. Think in **values + reactions**, not "render lifecycles"
2. **Never destructure** props or stores — destructuring breaks tracking
3. Always call signals as functions in the JSX (`{count()}`)
4. Use `<For>` (keyed) or `<Index>` (index-keyed) — never `.map()` over arrays of items you mutate
5. Reach for `createStore` once you have nested objects

## Key Patterns

### Signals & Effects

```tsx
import { createSignal, createEffect, createMemo } from 'solid-js';

function Counter() {
  const [count, setCount] = createSignal(0);
  const doubled = createMemo(() => count() * 2);

  createEffect(() => {
    console.log('count is', count());  // tracked
  });

  return <button onClick={() => setCount((c) => c + 1)}>{doubled()}</button>;
}
```

### Stores (nested reactive state)

```tsx
import { createStore } from 'solid-js/store';

const [user, setUser] = createStore({
  name: 'Ada',
  prefs: { theme: 'dark', lang: 'en' },
});

setUser('prefs', 'theme', 'light');         // path-based update
setUser('prefs', (p) => ({ ...p, lang: 'fr' }));
```

### Async Data (createResource)

```tsx
import { createResource, Suspense } from 'solid-js';

const fetchUser = (id: number) => fetch(`/api/u/${id}`).then((r) => r.json());

function User(props: { id: number }) {
  const [user] = createResource(() => props.id, fetchUser);
  return (
    <Suspense fallback={<p>Loading…</p>}>
      <h1>{user()?.name}</h1>
    </Suspense>
  );
}
```

### Control Flow

```tsx
import { Show, For } from 'solid-js';

<Show when={user()} fallback={<p>Sign in</p>}>
  {(u) => <h1>Hi {u().name}</h1>}
</Show>

<For each={items()}>
  {(item) => <li>{item.label}</li>}
</For>
```

### Props (preserve reactivity)

```tsx
// WRONG — destructuring loses reactivity
function Bad({ name }: Props) { return <p>{name}</p>; }

// RIGHT
function Good(props: Props) { return <p>{props.name}</p>; }

// To split props while keeping reactivity:
import { splitProps } from 'solid-js';
function Avatar(props: AvatarProps) {
  const [local, rest] = splitProps(props, ['src']);
  return <img src={local.src} {...rest} />;
}
```

### SolidStart (full-stack)

```tsx
// src/routes/users/[id].tsx
import { createAsync, useParams } from '@solidjs/router';

export default function UserPage() {
  const params = useParams();
  const user = createAsync(() => getUser(params.id));
  return <h1>{user()?.name}</h1>;
}
```

## Common Pitfalls

- Destructuring `props` → loses reactivity (props are getters)
- Wrapping JSX in `if` / ternary outside `<Show>` for reactive conditions
- Using `setStore(newObject)` to wholesale replace — use path syntax instead
- `async` work inside `createEffect` without cleanup — use `createResource`
- Calling signals outside reactive contexts and expecting subscription
- Treating SolidJS components like React: trying to "memo" them is meaningless

## When to Use This Mode

- Performance-critical UIs (charts, dashboards, editors)
- Apps where React's re-render model becomes painful
- Embedded widgets where bundle size matters
- Building a SolidStart full-stack app
- Teams comfortable with reactive primitives (RxJS, Svelte stores)

## Sources

- [SolidJS Fine-Grained Reactivity docs](https://docs.solidjs.com/advanced-concepts/fine-grained-reactivity)
- [Intro to reactivity](https://docs.solidjs.com/concepts/intro-to-reactivity)
- [SolidJS for React Developers](https://marmelab.com/blog/2025/05/28/solidjs-for-react-developper.html)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…