Toolverse
All skills

react

by lobehub

React component development guide. Use when working with React components (.tsx files), creating UI, using @lobehub/ui components, implementing routing, or building frontend features. Triggers on React component creation, modification, layout implementation, or navigation tasks.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
lobehub
Category
Frontend
Views
58

About this skill

React component development guide. Use when working with React components (.tsx files), creating UI, using @lobehub/ui components, implementing routing, or building frontend features. Triggers on React component creation, modification, layout implementation, or navigation tasks.

How to use

  1. Zainstaluj umiejętność w swoim agencie AI, wskazując repozytorium lobehub. Umiejętność będzie automatycznie dostępna podczas pracy z plikami React (.tsx).

  2. Gdy tworzysz nowy komponent, agent zasugeruje użycie komponentów z @lobehub/ui zamiast pisania od zera. Dla layoutów wybierz Flexbox lub Center z biblioteki; dla stylów złożonych użyj antd-style, a dla prostych — inline style.

  3. Sprawdź dostępne komponenty w referencji node_modules/@lobehub/ui/es/index.mjs. Najczęściej używane to ActionIcon, Button, Modal, Form, Input, Select, Tabs, SideNav i DraggablePanel.

  4. Przy implementacji routingu rozróżnij dwa systemy: Next.js App Router dla stron autentykacji (login, signup) w src/app/[variants]/(auth)/, oraz React Router DOM dla głównej aplikacji (chat, ustawienia) w desktopRouter.config.tsx.

  5. Dla dostępu do stanu globalnego używaj selektorów zustand store zamiast prop drilling. Umiejętność podpowie prawidłową składnię na podstawie istniejącego kodu w projekcie.

  6. Jeśli nie jesteś pewien użycia komponentu, przeszukaj istniejący kod projektu — większość komponentów rozszerza antd o dodatkowe właściwości, a wzorce są już tam udokumentowane.

Related skills