rerender-memo

Solid

Extract expensive work into memoized components with React.memo. Apply when components perform expensive computations that can be skipped when props haven't changed.

Web & Frontend 1,863 stars 111 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
100
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
50
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

## Extract to Memoized Components Extract expensive work into memoized components to enable early returns before computation. **Incorrect (computes avatar even when loading):** ```tsx function Profile({ user, loading }: Props) { const avatar = useMemo(() => { const id = computeAvatarId(user) return <Avatar id={id} /> }, [user]) if (loading) return <Skeleton /> return <div>{avatar}</div> } ``` **Correct (skips computation when loading):** ```tsx const UserAvatar = memo(function UserAvatar({ user }: { user: User }) { const id = useMemo(() => computeAvatarId(user), [user]) return <Avatar id={id} /> }) function Profile({ user, loading }: Props) { if (loading) return <Skeleton /> return ( <div> <UserAvatar user={user} /> </div> ) } ``` **Note:** If your project has [React Compiler](https://react.dev/learn/react-compiler) enabled, manual memoization with `memo()` and `useMemo()` is not necessary. The compiler automatically optimizes re-renders.

Details

Author
TheOrcDev
Repository
TheOrcDev/8bitcn-ui
Created
1 years ago
Last Updated
2 weeks ago
Language
TypeScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Featured

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

46,279 Updated today
CherryHQ
AI & Automation Solid

remotion-best-practices

Use this skill when the user asks about creating videos with React, Remotion framework, programmatic video generation, video animations, or needs help with Remotion projects

4,196 Updated 2 days ago
ComposioHQ
Web & Frontend Featured

dotlottie-web

Implement Lottie animations using dotLottie runtimes (@lottiefiles/dotlottie-web and @lottiefiles/dotlottie-react). Use when building, debugging, or optimizing dotLottie or Lottie animations in web projects, including vanilla JS, React, and Next.js. Covers package selection, Web Workers, state machines, theming, dynamic slot overriding, performance best practices, and common patterns.

744 Updated today
LottieFiles
Web & Frontend Solid

prototype-to-production

Convert design prototypes (HTML, CSS, Figma exports) into production-ready components. Analyzes prototype structure, extracts design tokens, identifies reusable patterns, and generates typed React components. Adapts to existing project tech stack with React + TypeScript as default.

322 Updated today
aiskillstore
AI & Automation Solid

remotion-best-practices

Best practices for Remotion - Video creation in React

1,041 Updated 3 days ago
dtsola