@@ -411,7 +411,6 @@ For example:
411
411
``` js
412
412
import { useState } from ' react' ;
413
413
414
- let nextId = 3 ;
415
414
const initialList = [
416
415
{ id: 0 , title: ' Big Bellies' },
417
416
{ id: 1 , title: ' Lunar Landscape' },
@@ -469,7 +468,6 @@ In this example, two separate artwork lists have the same initial state. They ar
469
468
``` js
470
469
import { useState } from ' react' ;
471
470
472
- let nextId = 3 ;
473
471
const initialList = [
474
472
{ id: 0 , title: ' Big Bellies' , seen: false },
475
473
{ 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
576
574
` ` ` js
577
575
import { useState } from ' react' ;
578
576
579
- let nextId = 3 ;
580
577
const initialList = [
581
578
{ id: 0 , title: ' Big Bellies' , seen: false },
582
579
{ id: 1 , title: ' Lunar Landscape' , seen: false },
@@ -672,7 +669,6 @@ Here is the Art Bucket List example rewritten with Immer:
672
669
import { useState } from ' react' ;
673
670
import { useImmer } from ' use-immer' ;
674
671
675
- let nextId = 3 ;
676
672
const initialList = [
677
673
{ id: 0 , title: ' Big Bellies' , seen: false },
678
674
{ id: 1 , title: ' Lunar Landscape' , seen: false },
0 commit comments