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.
2 parents 5d5cae2 + 8d8e5e9 commit 344e2beCopy full SHA for 344e2be
examples/web-vite/src/TestList.tsx
@@ -1,3 +1,5 @@
1
+import React from 'react';
2
+
3
interface TestListProps {
4
count: number;
5
}
@@ -19,11 +21,11 @@ interface ListItemProps {
19
21
20
22
23
const ListItem = ({ title }: ListItemProps) => {
- // Uncomment to introduce a performance issue
- // 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(() => {
27
+ forceRender({});
28
+ }, [title]);
29
30
return (
31
<div>
0 commit comments