Best Practice for Reacting to Params Changes with Vue Router
When using Vue Router with routes like /foo/:val you have to add a watcher to react for parameter changes . That results in somewhat annoying duplicate code in all views that have parameters in the URL. This could look like the following example: export default { // [...] created() { doSomething.call(this); }, watch: { '$route' () { doSomething.call(this); } }, } function doSomething() { // e.g. request API, assign view properties, ... } Is there any other way to overcome that? Can the handlers for created and $route changes be combined? Can the reuse of the component be disabled so that the