effect-props

Guides memoizing props before reading them inside Solid createEffect calls.

2|1|Updated Jun 28, 2026
One-click install
npx skills add https://github.com/lxsmnsyc/overwander --skill effect-props-lxsmnsyc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: effect-props
Source: https://github.com/lxsmnsyc/overwander/tree/main/.agents/skills/effect-props
Command: npx skills add https://github.com/lxsmnsyc/overwander --skill effect-props-lxsmnsyc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? In Solid, a createEffect re-runs whenever any signal it reads updates, even if the value is unchanged. When a parent list rebuilds its entries, every child receives new prop objects with identical values, and effects that read those props directly re-run wastefully — restarting fetches, playheads, timers, and subscriptions dozens of times for nothing. ## Core Features & Use Cases - Prop memoization rule: Route every prop an effect reads through a createMemo first, so the effect only wakes when the value actually changes (memos propagate on ===). - One memo per primitive: Keep separate memos per value rather than one memo over an object, since object memos produce new references and propagate as freely as the raw prop. - Scope guidance: Distinguishes stateful effects (fetches, playheads, canvases, timers, subscriptions) where memoization matters from cheap signal-writing effects and JSX reads where reading props directly is fine. - Use Case: A box of thirty creature squares rebuilds when one is picked; without memoized props, every square's effect reloads its sprite sheet thirty times, making the whole box visibly flinch. ## Quick Start Review this component's createEffect calls and wrap any props they read in createMemo so the effects only re-run when the underlying values actually change.

Frequently Asked Questions about effect-props

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

FAQPage Schema
How do I stop a Solid createEffect from re-running unnecessarily?▼

Wrap each prop the effect reads in a createMemo, then read the memo inside the effect. Memos propagate only on === equality, so the effect wakes only when the value actually changes instead of whenever the parent rebuilds the prop accessor.

Why does my Solid effect re-run when props have the same value?▼

Reading props.species inside an effect subscribes it to the accessor behind that prop. When a parent list rebuilds its entries, new prop objects with identical values still notify subscribers, so the effect re-runs even though nothing meaningful changed.

Should I use one createMemo per prop or one memo over an object?▼

Use one memo per primitive value. A memo over an object produces a new object reference each time, so it propagates as freely as the raw prop and defeats the purpose of memoization.

When is it fine to read props directly inside a Solid effect?▼

Reading props directly is fine in JSX, in memos, and in effects that only write a signal from a value. Memoization matters only for effects whose re-run costs something or discards state, such as fetches, playheads, canvases, timers, or subscriptions.

Does this pattern apply to Solid JSX and createMemo as well?▼

No. JSX and createMemo recompute cheaply and settle by value, so reading props straight there is correct. The rule targets createEffect specifically, where re-runs trigger side effects like network loads or subscription churn.