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 ac024ff commit 4d87a25Copy full SHA for 4d87a25
examples/web-vite/src/TestList.tsx
@@ -22,11 +22,11 @@ interface ListItemProps {
22
}
23
24
const ListItem = ({ title }: ListItemProps) => {
25
- // Uncomment to introduce a performance issue
26
- // const [, forceRender] = React.useState<object>();
27
- // React.useEffect(() => {
28
- // forceRender({});
29
- // }, [title]);
+ // Intentionally causing an extra re-render
+ const [, forceRender] = React.useState<object>();
+ React.useEffect(() => {
+ forceRender({});
+ }, [title]);
30
31
return (
32
<div>
0 commit comments