solid-syntax-jsx

Outline SolidJS JSX best practices for control-flow primitives and DOM optimization.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

SolidJS JSX patterns can suffer when React-centric approaches (like generic ternaries and map-based rendering) bypass fine-grained reactivity and DOM optimizations. This guide clarifies how to use SolidJS control-flow primitives to maintain predictable updates and high performance.

Core Features & Use Cases

  • Coverage of Show, For, Index, Switch/Match, Dynamic, Portal, and Suspense.
  • Explanation of SolidJS JSX compilation model and namespaced attributes for robust templates.
  • Practical guidance for common scenarios: conditional rendering, list rendering, dynamic components, and portal-driven UI.

Quick Start

Apply these JSX patterns when authoring SolidJS components to ensure correct reactivity and optimal DOM updates.

Frequently Asked Questions about solid-syntax-jsx

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

FAQPage Schema
How do I handle conditional rendering in SolidJS without breaking fine-grained reactivity?

Use the SolidJS Show primitive for conditional rendering instead of generic ternaries to maintain fine-grained reactivity. It ensures predictable reactive behavior and optimal DOM updates by only evaluating the condition and rendering the matched view without re-rendering the entire component.

What is the best way to render lists in SolidJS for optimal DOM updates?

Rendering lists in SolidJS is best handled by the For primitive for reference-keyed arrays or the Index primitive for index-keyed arrays. They optimize DOM updates by tracking items without mapping over arrays like React, ensuring high performance across large datasets.

Why does using map-based rendering cause performance issues in SolidJS components?

Map-based rendering causes performance issues in SolidJS because it bypasses the compiler's fine-grained reactivity model. It recreates DOM nodes unnecessarily, whereas using SolidJS control-flow primitives like Show and For ensures predictable updates and preserves DOM optimizations.

Can I use dynamic components and portals in SolidJS 1.x and 2.x projects?

Yes, you can use the Dynamic primitive for rendering dynamic components and the Portal primitive for portal-driven UI in SolidJS 1.x and 2.x projects. These primitives integrate natively with the SolidJS JSX compilation model to maintain robust templates and predictable reactivity.

When should I use Switch and Match over Show for SolidJS control flow?

Switch and Match should be used over Show when you have multiple mutually exclusive conditions to evaluate in SolidJS. This control-flow primitive pattern provides a cleaner structure for complex conditional routing compared to nested Show components.

How do Suspense boundaries work for asynchronous views in SolidJS?

Suspense boundaries in SolidJS work by catching asynchronous resource loading and displaying fallback content until resolution. Applying this Suspense primitive within your JSX patterns ensures smooth UI transitions during data fetching without blocking the main thread.