react-performance — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited react-performance (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
React rendering behavior, memoization strategies, code splitting, bundle optimization, and App Router-specific performance patterns. Focus on understanding when optimizations help vs. when they add unnecessary complexity.
React calculates the next UI, diffs against the previous version, and commits only minimum DOM changes. For this to work efficiently:
Cache expensive computations so they only re-run when dependencies change:
const sorted = useMemo(() => expensiveSort(items), [items]);Use when: The computation is measurably expensive (filtering thousands of items, complex calculations). Skip when: Simple operations, cheap object creation — the overhead of memoization outweighs the savings.
Memoize function definitions to maintain reference equality:
const handleClick = useCallback(() => { doThing(id); }, [id]);Use when: Passing callbacks to children wrapped in React.memo — prevents child re-renders from new function references. Skip when: Passing to native DOM elements or non-memoized children.
Skip re-rendering a component when its props haven't changed:
const ExpensiveList = React.memo(function ExpensiveList({ items }: Props) {
return items.map(item => <Item key={item.id} data={item} />);
});Use when: Component renders are expensive and parent re-renders frequently with unchanged props.
Wrapping everything in useMemo/useCallback adds memory overhead with no measurable benefit for cheap operations. Profile first, optimize second.
The React Compiler uses static analysis to automatically memoize values derived from props or state. Significantly reduces the need for manual useMemo and useCallback.
Dynamically import components to split bundles by view:
const Settings = lazy(() => import('./Settings'));
function App() {
return (
<Suspense fallback={<Loading />}>
<Settings />
</Suspense>
);
}Server Components execute on the server only — large dependencies (markdown parsers, date libraries, syntax highlighters) never enter the client bundle.
Push "use client" as deep as possible. Keep large static layouts as Server Components; isolate interactivity into small Client Components.
Dynamically import dev tools to exclude from production:
if (process.env.NODE_ENV !== 'production') {
import('react-axe').then(axe => axe.default(React, ReactDOM, 1000));
}Send static UI immediately, stream data-heavy components as they resolve:
loading.tsx — route-level streaming fallback<Suspense> — per-component granular streamingAvoid sequential waterfalls with Promise.all():
const [users, posts] = await Promise.all([fetchUsers(), fetchPosts()]);<Link> components auto-prefetch in production when entering the viewport. Navigations become near-instant.
Next.js Data Cache stores fetch results automatically, avoiding redundant requests across renders.
| Anti-Pattern | Impact | Fix |
|---|---|---|
| Sequential fetches when independent | Multiplied load time | Promise.all() |
| Bloated Context providers | All consumers re-render on any change | Split contexts by concern |
| Missing/wrong dependency arrays | Stale closures or over-firing effects | Follow exhaustive-deps rule |
| Deep equality in React.memo | Unpredictable multi-second stalls | Restructure props, use stable references |
| Sync setState in useEffect | Extra render before paint | Restructure to avoid or use useLayoutEffect |
Everything in useMemo/useCallback | Memory overhead, code noise | Profile first, memoize only when measured |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.