Skip to content

Commit d964067

Browse files
authored
Update part6d.md
Display component is not using the prop or the dispatch from the context.
1 parent 723ee2a commit d964067

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/6/en/part6d.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ const App = () => {
552552

553553
return (
554554
<CounterContext.Provider value={[counter, counterDispatch]}> // highlight-line
555-
<Display counter={counter}/>
555+
<Display />
556556
<div>
557557
<Button type='INC' label='+' />
558558
<Button type='DEC' label='-' />
@@ -574,7 +574,7 @@ import { useContext } from 'react' // highlight-line
574574
import CounterContext from './CounterContext'
575575

576576
const Display = () => {
577-
const [counter, dispatch] = useContext(CounterContext) // highlight-line
577+
const [counter] = useContext(CounterContext) // highlight-line
578578
return <div>
579579
{counter}
580580
</div>

0 commit comments

Comments
 (0)