Skip to content

Instantly share code, notes, and snippets.

@romgrk
Created December 16, 2025 09:32
Show Gist options
  • Select an option

  • Save romgrk/3c64ac061e2267d65db22703d32a5abf to your computer and use it in GitHub Desktop.

Select an option

Save romgrk/3c64ac061e2267d65db22703d32a5abf to your computer and use it in GitHub Desktop.
'use client';
import * as React from 'react';
const rows = 1000;
const effects = 100;
export default function Component() {
return (
<div>
{Array.from({ length: rows }).map((_, i) => (
<div key={i}>
<Row />
</div>
))}
</div>
);
}
function Row() {
for (let i = 0; i < effects; i++) {
React.useEffect(() => {
// no-op
}, []);
}
for (let i = 0; i < effects; i++) {
React.useLayoutEffect(() => {
// no-op
}, []);
}
for (let i = 0; i < effects; i++) {
React.useInsertionEffect(() => {
// no-op
}, []);
}
return <div>Row</div>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment