Toolverse
All skills

rendering-hoist-jsx

by TheOrcDev

Extract static JSX elements outside components to avoid re-creation on every render. Apply when rendering static elements repeatedly or in lists.

Installation

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

Installation

Quick info

Author
TheOrcDev
Category
Frontend
Views
3

About this skill

Extract static JSX elements outside components to avoid re-creation on every render. Apply when rendering static elements repeatedly or in lists.

How to use

  1. Zidentyfikuj statyczne elementy JSX wewnątrz komponentu — te, które nie zmieniają się w zależności od propsów ani stanu. Typowe przykłady to ikony, elementy ładowania czy szablony SVG.

  2. Przenieś element JSX poza komponent, przypisując go do zmiennej na poziomie modułu (przed definicją funkcji komponentu). Na przykład zamiast renderować div z klasą animacji wewnątrz funkcji, zdefiniuj go jako const loadingSkeleton =

    .

  3. Zastąp renderowanie elementu w komponencie odwołaniem do zmiennej. Zmień {loading && } na {loading && loadingSkeleton}.

  4. Powtórz proces dla każdego statycznego elementu, który pojawia się w listach lub jest renderowany warunkowo wiele razy. Zwróć szczególną uwagę na duże węzły SVG, które są kosztowne do przebudowy.

  5. Przetestuj komponent, aby upewnić się, że wygląd i zachowanie pozostały niezmienione. Zmiana powinna być transparentna dla użytkownika — widoczna tylko jako poprawa wydajności.

  6. Jeśli projekt ma włączony React Compiler, możesz pominąć ręczną optymalizację — kompilator wykona ją automatycznie. Skill pozostaje przydatny dla projektów bez kompilatora lub jako dokumentacja najlepszych praktyk.

Related 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.

Frontend
2058

dev-browser

by SawyerHood

Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include \

Frontend
38151

angular

by sickn33

Modern Angular (v20+) expert with deep knowledge of Signals, Standalone Components, Zoneless applications, SSR/Hydration, and reactive patterns. Use PROACTIVELY for Angular development, component architecture, state management, performance optimization, and migration to modern

Frontend
2656

domain-name-brainstormer

by ComposioHQ

Generates creative domain name ideas for your project and checks availability across multiple TLDs (.com, .io, .dev, .ai, etc.). Saves hours of brainstorming and manual checking.

Frontend
21116

tailwind-design-system

by wshobson

Build scalable design systems with Tailwind CSS, design tokens, component libraries, and responsive patterns. Use when creating component libraries, implementing design systems, or standardizing UI patterns.

Frontend
2676

theme-factory

by anthropics

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

Frontend
40139