Skip to content

Commit dcc3c22

Browse files
authored
Merge pull request #3246 from willylin207/part1cOnClickTypo
Fix button onClick typo in part1c.md en/fr
2 parents 58188a9 + eed4c7a commit dcc3c22

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/content/1/en/part1c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ const Button = ({ onSmash, text }) => (
755755
We can simplify the Button component once more by declaring the return statement in just one line:
756756
757757
```js
758-
const Button = ({ onSmash, text }) => <button onSmash={onSmash}>{text}</button>
758+
const Button = ({ onSmash, text }) => <button onClick={onSmash}>{text}</button>
759759
```
760760
761761
**NB**: However, be careful to not oversimplify your components, as this makes adding complexity a more tedious task down the road.

src/content/1/fr/part1c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ const Button = ({ onSmash, text }) => (
716716
Nous pouvons simplifier une fois de plus le composant Button en déclarant l'instruction de retour en une seule ligne :
717717
718718
```js
719-
const Button = ({ onSmash, text }) => <button onSmash={onSmash}>{text}</button>
719+
const Button = ({ onSmash, text }) => <button onClick={onSmash}>{text}</button>
720720
```
721721
722722
**NB** : Cependant, veillez à ne pas trop simplifier vos composants, car cela rend l'ajout de complexité plus fastidieux par la suite.

0 commit comments

Comments
 (0)