Skip to content

Commit 4f9d7f4

Browse files
authored
Small inconsistency in updating-arrays-in-state.md fixed
This in-text code snippet in the text mentions a function named "updateMyTodos". However, this function name does not actually exist in the interactive code example to which the code snippet seems to refer. Instead, the function name in this code snippet should probably be changed to "updateMyList" which refers to a function that does exist in the example, to improve the consistency. This is likely a tiny error.
1 parent ad4f5c7 commit 4f9d7f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/learn/updating-arrays-in-state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ function ItemList({ artworks, onToggle }) {
766766
Note how with Immer, **mutation like `artwork.seen = nextSeen` is now okay:**
767767

768768
```js
769-
updateMyTodos(draft => {
769+
updateYourList(draft => {
770770
const artwork = draft.find(a => a.id === artworkId);
771771
artwork.seen = nextSeen;
772772
});

0 commit comments

Comments
 (0)