Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjastrzebski committed Jan 31, 2025
1 parent ac024ff commit 4d87a25
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/web-vite/src/TestList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ interface ListItemProps {
}

const ListItem = ({ title }: ListItemProps) => {
// Uncomment to introduce a performance issue
// const [, forceRender] = React.useState<object>();
// React.useEffect(() => {
// forceRender({});
// }, [title]);
// Intentionally causing an extra re-render
const [, forceRender] = React.useState<object>();
React.useEffect(() => {
forceRender({});
}, [title]);

return (
<div>
Expand Down

0 comments on commit 4d87a25

Please sign in to comment.