We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ae59bd commit b78218cCopy full SHA for b78218c
examples/web-vite/src/TestList.tsx
@@ -19,11 +19,11 @@ interface ListItemProps {
19
}
20
21
const ListItem = ({ title }: ListItemProps) => {
22
- // Uncomment to introduce a performance issue
23
- // const [, forceRender] = React.useState<object>();
24
- // React.useEffect(() => {
25
- // forceRender({});
26
- // }, [title]);
+ // Intentionally causing an extra re-render
+ const [, forceRender] = React.useState<object>();
+ React.useEffect(() => {
+ forceRender({});
+ }, [title]);
27
28
return (
29
<div>
0 commit comments