solid-core-jsx-attributes

Explain SolidJS JSX attribute directives for performance and Web Components.

Updated Jan 4, 2026
One-click install
npx skills add https://github.com/vallafederico/solid-ai-rules --skill solid-core-jsx-attributes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solid-core-jsx-attributes
Source: https://github.com/vallafederico/solid-ai-rules/tree/main/.claude/skills/solid-core-jsx-attributes
Command: npx skills add https://github.com/vallafederico/solid-ai-rules --skill solid-core-jsx-attributes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill clarifies and demonstrates advanced JSX attribute usage in SolidJS, enabling developers to optimize performance and correctly integrate with Web Components.

Core Features & Use Cases

  • Performance Optimization: Use @once for static values to reduce unnecessary reactivity.
  • Web Component Integration: Utilize attr:*, bool:*, and prop:* for precise attribute and property handling.
  • Content Manipulation: Employ textContent and innerHTML for direct element content updates, with appropriate warnings.
  • Use Case: When building a custom SolidJS component that interacts with a third-party Web Component, you can use attr:data-id to set an attribute or prop:value to set a property, ensuring correct communication.

Quick Start

Learn how to use the @once directive in SolidJS JSX for static values.

Frequently Asked Questions about solid-core-jsx-attributes

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

FAQPage Schema
How do I optimize SolidJS reactivity for static JSX attributes?

To optimize SolidJS reactivity for static values, use the `@once` directive on JSX attributes. This prevents unnecessary reactive updates by ensuring the value is only set once during initial rendering.

What is the best way to set properties and attributes on Web Components in SolidJS?

The best way to integrate Web Components in SolidJS is using `attr:*` to set HTML attributes, `bool:*` for boolean attributes, and `prop:*` to set element properties directly for precise communication.

How does SolidJS handle direct DOM content manipulation like innerHTML?

SolidJS handles direct DOM content manipulation using `textContent` and `innerHTML` JSX attributes. These enable direct element content updates, though `innerHTML` requires careful security considerations to prevent vulnerabilities.

When should I use the prop directive instead of attr in SolidJS?

Use the `prop:*` directive in SolidJS when setting complex object properties on Web Components, while `attr:*` is used for standard HTML string attributes to ensure correct DOM integration.

Why are my SolidJS Web Component properties not updating correctly?

Web Component properties in SolidJS may not update correctly if standard attributes are used instead of `prop:*` or `bool:*` directives, which are required for precise property handling and accurate component communication.