I just came across this code:
routes: routes.map(route => ({
Notice the arrow function being followed by a closure. Why are closures used here?
see this repo for reference: https://github.com/prograhammer/vue-pizza/blob/master/src/http/router.js#L33