Why?
Being an average developer is not good enough for me, it’s time for an upgrade. It’s time to go from average to awesome.
Goals
- Improve Vue.js skills - Vuerouter and Vuex
- Update Laravel Knowledge
- What CSS Framework?
Steps
- https://laracasts.com/series/laravel-vue-and-spas/
- VueSchool
Vue-router
https://vueschool.io/lessons/create-a-new-project-with-vue-router-using-the-vue-cli-ui
- Map different states to different URLs giving you virtual pages.
- Doesn’t reload, just swaps component.
Routes in /router/index.js main.js mounts the app
App.vue is the single page.
<router-link to="/">Home</router-link> |
//renders the component
<router-view />
New routes need to be registered in the routes array/
Lazy loading and magic comments:
path: "/hawaii",
name: "hawaii",
component: () => import(/* webpackChunkName: "hawaii" */ "../views/Hawaii")
},```
Passing oarams to views:
```<router-link :to="{name:'DestinationDetails', params: {id:destination.id}}">```
### vue-cli
vue ui ```
Vuex
- Way to manage the data as complexity increases.
- Centralizes application data in a central store.