Claude Skill

react

Frontend component library.

LLM Mart · 0 points · 2 views 0 listing impressions 0 install-command copies
Download dhaupin-vant-models_public_vant_skills_vant-skill-react-e1e348e.zip · 0 KB

Install

skills CLI npx skills add https://github.com/dhaupin/vant/tree/main/models/public/vant/skills/vant-skill-react
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install dhaupin-vant@llmmart
Git git clone https://github.com/dhaupin/vant.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole dhaupin/vant collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

React

Frontend component library.


When To Use

  • DOM components
  • SPA framework
  • Component-based UI

What To Do

1. Component Pattern

function MyComponent({ prop }) {
  const [state, setState] = useState(null)

  useEffect(() => {
    // side effects
  }, [])

  return <div>{prop}</div>
}

2. Common Hooks

Hook What
useState Local state
useEffect Side effects
useContext Shared state
useRef DOM reference
useMemo Memorized value
useCallback Memorized function

3. Patterns

// Conditional
{condition && <Component />}

// List
items.map(item => <Item key={item.id} {...item} />)

// Form
<form onSubmit={handleSubmit}>
  <input value={value} onChange={e => setValue(e.target.value)} />
</form>

4. Testing

render(<MyComponent prop="value" />)
expect(screen.getByText('value')).toBeInTheDocument()

Output

## React

| Component | Tested | Status |
|------------|--------|--------|
| [name] | [YES/NO] | [OK] |

### Props Interface
- [list]

Role: React Developer Input: Components Output: Working UI

Component-based UI.

Files (vant)
  • SKILL.md 1.3 KB
    ---
    name: react
    description: Frontend component library.
    license: MIT
    metadata:
      author: vant
      version: "1.0"
    ---
    
    # React
    
    > Frontend component library.
    
    ---
    
    ## When To Use
    
    - DOM components
    - SPA framework
    - Component-based UI
    
    ---
    
    ## What To Do
    
    ### 1. Component Pattern
    
    ```jsx
    function MyComponent({ prop }) {
      const [state, setState] = useState(null)
    
      useEffect(() => {
        // side effects
      }, [])
    
      return <div>{prop}</div>
    }
    ```
    
    ### 2. Common Hooks
    
    | Hook | What |
    |------|------|
    | useState | Local state |
    | useEffect | Side effects |
    | useContext | Shared state |
    | useRef | DOM reference |
    | useMemo | Memorized value |
    | useCallback | Memorized function |
    
    ### 3. Patterns
    
    ```jsx
    // Conditional
    {condition && <Component />}
    
    // List
    items.map(item => <Item key={item.id} {...item} />)
    
    // Form
    <form onSubmit={handleSubmit}>
      <input value={value} onChange={e => setValue(e.target.value)} />
    </form>
    ```
    
    ### 4. Testing
    
    ```javascript
    render(<MyComponent prop="value" />)
    expect(screen.getByText('value')).toBeInTheDocument()
    ```
    
    ---
    
    ## Output
    
    ```
    ## React
    
    | Component | Tested | Status |
    |------------|--------|--------|
    | [name] | [YES/NO] | [OK] |
    
    ### Props Interface
    - [list]
    ```
    
    ---
    
    **Role**: React Developer **Input**: Components **Output**: Working UI
    
    > Component-based UI.

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.