Skip to content

Commit b8d6799

Browse files
committed
Remove extra variable from the "Updating arrays in state" page
1 parent ec8b46d commit b8d6799

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ For example:
411411
```js
412412
import { useState } from 'react';
413413

414-
let nextId = 3;
415414
const initialList = [
416415
{ id: 0, title: 'Big Bellies' },
417416
{ id: 1, title: 'Lunar Landscape' },
@@ -469,7 +468,6 @@ In this example, two separate artwork lists have the same initial state. They ar
469468
```js
470469
import { useState } from 'react';
471470

472-
let nextId = 3;
473471
const initialList = [
474472
{ id: 0, title: 'Big Bellies', seen: false },
475473
{ id: 1, title: 'Lunar Landscape', seen: false },
@@ -576,7 +574,6 @@ With this approach, none of the existing state items are being mutated, and the
576574
```js
577575
import { useState } from 'react';
578576

579-
let nextId = 3;
580577
const initialList = [
581578
{ id: 0, title: 'Big Bellies', seen: false },
582579
{ id: 1, title: 'Lunar Landscape', seen: false },
@@ -672,7 +669,6 @@ Here is the Art Bucket List example rewritten with Immer:
672669
import { useState } from 'react';
673670
import { useImmer } from 'use-immer';
674671

675-
let nextId = 3;
676672
const initialList = [
677673
{ id: 0, title: 'Big Bellies', seen: false },
678674
{ id: 1, title: 'Lunar Landscape', seen: false },

0 commit comments

Comments
 (0)