Vant skill react
Frontend component library.From its SKILL.md
npx -y skills add dhaupin/vant --skill vant-skill-reactAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 16 stars16 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.3 KB, 311 tokens by cl100k_base, as published. Nobody here has run it
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.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.