react-component-builder

bởi AgentsRoomĐược xác minh bởi AgentsRoomChưa có lượt cài đặtChưa có lượt thíchCập nhật 7 tháng 5, 2026Danh mục: Kỹ thuật

Nó làm gì

Use when creating new React components. Generates them with TypeScript, Tailwind, and colocated tests.

Cài đặt sẽ mở mục này trong ứng dụng desktop AgentsRoom của bạn. Nếu ứng dụng chưa được cài, bạn sẽ được đưa tới trang tải về.

SKILL.md

---
name: react-component-builder
description: Use when creating new React components. Generates them with TypeScript, Tailwind, and colocated tests.
---

# React component builder

When asked to create a new component:

1. Place it in `src/components/<Name>.tsx` unless told otherwise.
2. Use `forwardRef` if the component accepts a `ref` prop.
3. Type props with an exported interface named `<Name>Props`.
4. Style with Tailwind utility classes.
5. Add a colocated `<Name>.test.tsx` covering the happy path and one edge case.

Avoid:
- `React.FC` (prefer typed function declarations)
- Index re-exports unless explicitly requested
- Inline objects in JSX props (extract to `useMemo` if needed)

Tag

frontendreacttypescript