Skip to content

Commit 8f81abd

Browse files
authored
Fix cat scrolling example
1 parent 0bfd418 commit 8f81abd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/reference/react/StrictMode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ export default function CatFriends() {
11701170
console.log('❌ Too many cats in the list!');
11711171
}
11721172
return () => {
1173-
list.splice(list.indexOf(item));
1173+
list.splice(list.indexOf(item), 1);
11741174
console.log(`❌ Removing cat from the map. Total cats: ${itemsRef.current.length}`);
11751175
}
11761176
}}

0 commit comments

Comments
 (0)