Hacker News new | ask | show | jobs
by thewhitetulip 3499 days ago
I would like to know more about your use of Vue and the router in production. Tips/best case guidelines?
1 comments

If you have a relatively large app and having URLs makes sense, the router is a no brainer.

No real tips; the vue-router documentation is excellent.

If you're coming from Vue 1, the only thing that did confuse me is that the router hooks have changed. The router now listens on `beforeRouteEnter` and `beforeRouteLeave` and these hooks only get triggered once per route change. Therefore, to listen to query changes on a route you need to watch the `$route` object.