Hello Community! ๐
Today i want to show you 5 advices for choose Vue.js like your Js Framework. It have a lot of features, but for me this is the best 5 for help you to know the "power" of Vue.
- Simply to use ๐จโ๐ป
- Vue CLI desktop/smartphone "live page refresh" ๐ป๐ฑ
- Router ๐
- Npm package ๐
- Easy to build โ
1๏ธโฃ Simply to use ๐จโ๐ป :
You know the base of HTML, CSS and Javascript? You are ready to use Vue.js.
Vue file is very simply and intuitive; you have:
Template where you can write your HTML,
Script where you can write your Js,
Style where you can write your CSS or SCSS lang
<template>
<!-- Your HTML -->
</template>
<script>
export default {
// Your JS
}
</script>
<style lang="css">
/* Your CSS or SCSS */
</style>
2๏ธโฃ Vue CLI ๐ป๐ฑ:
Install Vue CLI is the best way for you; itโs awesome, and itโs give to you all the file you need for your Vue app.
vue create hello-world
Another trick? After run NPM RUN SERVE, when you you save your modify (CMND + S), you can see the change โin liveโ without refresh you page every time.
Vue CLI give you easily way for see your change with a pc browser like โLocal urlโ, or via mobile like โNetwork urlโ.
3๏ธโฃ Router ๐:
This is another awesome Vue feature; Vue created an easy way for navigate between the page: after install your router, you have need to set the route for you file.vue
And then set the router-link โbuttonโ for navigate in this page.
4๏ธโฃ Npm package ๐:
You have a lot of package for install what you need; after install you need only to โimportโ the element on your file.vue script or globally on your main.js, and you can use your favorite package!
<script>
import axios from 'axios';
</script>
*In this case i used Axios
5๏ธโฃ Easy to build โ :
This is last step:
npm run-build
After this command you can copy index.html and /dist/ folder into your website root directory, and itโs Done, your first Vue site is online!
Hope this info help your on a choice of Js framework... In this case, VUE!
๐โโ๏ธ
Top comments (3)
You can also use Nuxt.js, which is also awesome!
Thank you Khaleel; Nuxt.js is on my "study list"! ๐ฎ
It's not too hard, you'll enjoy it!
Some comments may only be visible to logged-in visitors. Sign in to view all comments.