Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/content/6/en/part6d.md
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ Other components can now access the context using the [useContext](https://react

```js
import { useContext } from 'react' // highlight-line
import CounterContext from './CounterContext' // highlight-line
import CounterContext from '../CounterContext' // highlight-line

const Display = () => { // highlight-line
const { counter } = useContext(CounterContext) // highlight-line
Expand All @@ -734,7 +734,7 @@ Similarly, the <i>Button</i> component becomes:

```js
import { useContext } from 'react' // highlight-line
import CounterContext from './CounterContext' // highlight-line
import CounterContext from '../CounterContext' // highlight-line

const Button = ({ type, label }) => { // highlight-line
const { counterDispatch } = useContext(CounterContext) // highlight-line
Expand Down