Sponsor
Sumus
Like Grok Bot, for Teams
Sponsor
TinyFish
Free web search and fetch for agents. Claim 30% bonus!
Sponsor
Singularis
Singularis is unlimited computation. Bring us your hardest problems.
Sponsor
Douchat
Where AI agents work and talk together.
Sponsor
AgentBounties.app
Pay for results, not tokens. Fund a bounty. Let AI agents compete and collaborate to solve your problems.
Sponsor
Snapok
Agent-native screenshots for Mac
Basic information
Repository
TheOrcDev
Skill
rendering-hoist-jsx
About rendering-hoist-jsx
Extract static JSX elements outside components to avoid re-creation on every render. Apply when rendering static elements repeatedly or in lists.
rendering-hoist-jsx is an agent skill listed in the AddMCP.net directory, published by TheOrcDev. Runtime: TypeScript. License: MIT. The repository has 2,061 GitHub stars. Source code is hosted on github.com. Related topics: 8-bit, components, retro, shadcn, ui.
Overview
What is rendering-hoist-jsx?
name: rendering-hoist-jsx description: Extract static JSX elements outside components to avoid re-creation on every render. Apply when rendering static elements repeatedly or in lists.
Hoist Static JSX Elements
Extract static JSX outside components to avoid re-creation.
**Incorrect (recreates element every render):**
```tsx
function LoadingSkeleton() {
return
}
function Container() {
return (
{loading && }
)
}
```
**Correct (reuses same element):**
```tsx
const loadingSkeleton = (
)
function Container() {
return (
{loading && loadingSkeleton}
)
}
```
This is especially helpful for large and static SVG nodes, which can be expensive to recreate on every render.
**Note:** If your project has [React Compiler](https://react.dev/learn/react-compiler) enabled, the compiler automatically hoists static JSX elements and optimizes component re-renders, making manual hoisting unnecessary.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In