From 1126acdb46f1354379f7fb061360f16409e14d5a Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 23 Jun 2025 14:12:18 +0200 Subject: [PATCH] docs: some lifecycle Close #2516 --- packages/docs/guide/essentials/dynamic-matching.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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`: -- 2.47.2