Performance optimization for React/React Native — re-renders, memoization, FlashList, memory leaks, and bundle size.
65
80%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.skillshare/skills/1k-performance/SKILL.mdPerformance optimization patterns and best practices for React/React Native applications in the OneKey monorepo.
| Category | Key Optimization | When to Use |
|---|---|---|
| Concurrent Requests | Limit to 3-5, use executeBatched | Multiple API calls, network-heavy operations |
| Bridge Optimization | Minimize crossings, batch data | React Native bridge overhead, iOS/Android |
| List Rendering | FlashList, windowSize={5}, content-visibility | Lists with 100+ items |
| Memoization | memo, useMemo, useCallback | Expensive computations, prevent re-renders |
| Heavy Operations | InteractionManager, setTimeout | UI blocking operations |
// ❌ BAD - Can freeze UI with 15+ requests
const requests = items.map(item => fetchData(item));
await Promise.all(requests);async function executeBatched<T>(
tasks: Array<() => Promise<T>>,
concurrency = 3,
): Promise<Array<PromiseSettledResult<T>>> {
const results: Array<PromiseSettledResult<T>> = [];
for (let i = 0; i < tasks.length; i += concurrency) {
const batch = tasks.slice(i, i + concurrency);
const batchResults = await Promise.allSettled(
batch.map((task) => task()),
);
results.push(...batchResults);
}
return results;
}
const tasks = items.map(item => () => fetchData(item));
await executeBatched(tasks, 3); // Max 3 concurrentAlready Optimized - NO ACTION NEEDED:
| Component | Optimization | Details |
|---|---|---|
ListView | windowSize={5} | Auto-limits visible items |
Tabs | contentVisibility: 'hidden' | Hides inactive tabs |
Dialog | contentVisibility: 'hidden' | Hides when closed |
For comprehensive performance optimization strategies, see performance.md.
Topics covered:
/1k-coding-patterns - General coding patterns and conventions/1k-sentry - Sentry error analysis (includes performance issues)d71e6b7
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.