Skip to content

Commit

Permalink
Update useContext.md
Browse files Browse the repository at this point in the history
  • Loading branch information
linsolas authored and tdd committed Jul 20, 2023
1 parent 3188c56 commit 77b8f8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/content/reference/react/useContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function MyComponent() {
### Transmettre des données en profondeur dans l'arbre {/*passing-data-deeply-into-the-tree*/}
Appelez `useContext` au niveau le plus élevé de votre composant pour lire et souscrire au [contexte](/learn/passing-data-deeply-with-context).
Appelez `useContext` au niveau le plus élevé de votre composant pour lire et vous abonner au [contexte](/learn/passing-data-deeply-with-context).
```js [[2, 4, "theme"], [1, 4, "ThemeContext"]]
import { useContext } from 'react';
Expand Down Expand Up @@ -107,7 +107,7 @@ export default function MyApp() {
function Form() {
return (
<Panel title="Bienvenue">
<Button>S'enregistrer</Button>
<Button>S'inscrire</Button>
<Button>Se connecter</Button>
</Panel>
);
Expand Down Expand Up @@ -232,7 +232,7 @@ export default function MyApp() {
function Form({ children }) {
return (
<Panel title="Bienvenue">
<Button>S'enregistrer</Button>
<Button>S'inscrire</Button>
<Button>Se connecter</Button>
</Panel>
);
Expand Down

0 comments on commit 77b8f8b

Please sign in to comment.