diff --git a/src/content/5/en/part5e.md b/src/content/5/en/part5e.md index d60a2d616cd..e35761c2dc7 100644 --- a/src/content/5/en/part5e.md +++ b/src/content/5/en/part5e.md @@ -477,7 +477,7 @@ const Note = ({ note, id, toggleImportanceOf, deleteNote }) => { // highlight-l export default Note ``` -One way is to determine the id of the note to be displayed within the component using React Router's [useMatch](https://reactrouter.com/en/main/hooks/use-match) hook function. +One way is to determine the id of the note to be displayed within the component using React Router's [useMatch](https://reactrouter.com/api/hooks/useMatch) hook function. It is not possible to use the useMatch hook in the same component that defines the routable part of the application. Let’s move the Router component outside of App: diff --git a/src/content/5/fi/osa5e.md b/src/content/5/fi/osa5e.md index dcb73434d00..4e557157376 100644 --- a/src/content/5/fi/osa5e.md +++ b/src/content/5/fi/osa5e.md @@ -478,7 +478,7 @@ export default Note ``` -Eräs tapa on selvittää näytettävän muistiinpanon id komponentissa jo App React Routerin hook-funktion [useMatch](https://reactrouter.com/en/main/hooks/use-match) avulla. +Eräs tapa on selvittää näytettävän muistiinpanon id komponentissa jo App React Routerin hook-funktion [useMatch](https://reactrouter.com/api/hooks/useMatch) avulla. useMatch-hookin käyttö ei ole mahdollista samassa komponentissa, joka määrittelee sovelluksen reititettävän osan. Siirretään Router komponentin App ulkopuolelle: diff --git a/src/content/7/fr/part7a.md b/src/content/7/fr/part7a.md index a99d0a4b804..680f4736c02 100644 --- a/src/content/7/fr/part7a.md +++ b/src/content/7/fr/part7a.md @@ -420,7 +420,7 @@ const Note = ({ note }) => { } ``` -Une façon de faire cela serait d'utiliser le hook [useMatch](https://reactrouter.com/en/v6.3.0/api#usematch) de React Router pour déterminer l'identifiant de la note à afficher dans le composant _App_. +Une façon de faire cela serait d'utiliser le hook [useMatch](https://reactrouter.com/api/hooks/useMatch) de React Router pour déterminer l'identifiant de la note à afficher dans le composant _App_. Il n'est pas possible d'utiliser le hook useMatch dans le composant qui définit la partie routée de l'application. Déplaçons l'utilisation des composants Router depuis App: diff --git a/src/content/7/zh/part7a.md b/src/content/7/zh/part7a.md index a2743fa1941..be73eb18fd9 100644 --- a/src/content/7/zh/part7a.md +++ b/src/content/7/zh/part7a.md @@ -468,8 +468,8 @@ const Note = ({ note }) => { } ``` - - 一种方法是使用React Router's [useMatch](https://reactrouter.com/en/main/hooks/use-match)钩子来计算出要在_App_组件中显示的笔记的id。 + + 一种方法是使用React Router's [useMatch](https://reactrouter.com/api/hooks/useMatch)钩子来计算出要在_App_组件中显示的笔记的id。 在定义应用的路由部分的组件中不可能使用useMatch钩。让我们把_Router_组件的使用从_App_移开。