How to listen for the route change? #4240
-
Some time ago I used preact + preact-router and my app page components were wrapped in a Now I used So my question is how do I start listening to the route updates with this setup? Is there a preact/vike/vite hook for this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think I found a way to listen to route change. |
Beta Was this translation helpful? Give feedback.
I think I found a way to listen to route change.
useEffect
onpageContext.urlPathname
in the main component does the job. At least for now it's enough.