From: Eduardo San Martin Morote Date: Mon, 23 Jun 2025 12:12:18 +0000 (+0200) Subject: docs: some lifecycle X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1126acdb46f1354379f7fb061360f16409e14d5a;p=thirdparty%2Fvuejs%2Frouter.git docs: some lifecycle Close #2516 --- diff --git a/packages/docs/guide/essentials/dynamic-matching.md b/packages/docs/guide/essentials/dynamic-matching.md index 9c9fd0b9..6c221b51 100644 --- a/packages/docs/guide/essentials/dynamic-matching.md +++ b/packages/docs/guide/essentials/dynamic-matching.md @@ -56,7 +56,7 @@ A working demo of this example can be found [here](https://codesandbox.io/s/rout title="Learn how to react to param changes" /> -One thing to note when using routes with params is that when the user navigates from `/users/johnny` to `/users/jolyne`, **the same component instance will be reused**. Since both routes render the same component, this is more efficient than destroying the old instance and then creating a new one. **However, this also means that the lifecycle hooks of the component will not be called**. +One thing to note when using routes with params is that when the user navigates from `/users/johnny` to `/users/jolyne`, **the same component instance will be reused**. Since both routes render the same component, this is more efficient than destroying the old instance and then creating a new one. **However, this also means that some lifecycle hooks of the component will not be called**. To react to params changes in the same component, you can simply watch anything on the `route` object, in this scenario, the `route.params`: