thoughtSpace
TwitterGithubRSS Feed

Note Space

Hints, cheat sheets and notes on code.

Home

Vue Crash Course

Posted on April 7, 2022
Vue-JS

Vue.js is often described as a combination of React and Angular, borrowing the prop-driven development of React and the templating power of Angular.

This makes Vue an accessible framework for beginners to pick up, especially since it focuses on traditional HTML and CSS, rather than being a CSS-in-JS framework like React or relying on TypeScript (a superset of JavaScript) like Angular does.

The Vue CLI offers a number of useful features that enhance the Vue development experience, but the main feature is its ability to generate and pre-configure a new single-page application with the vue create command.

Setting up a vue project using vue-cli:

vue create vue-starter-project

Options

Manually select options Class style syntax N Typescript Y History mode will make each route its own URL. This means you will not have the /#/ (hash) in your application’s URL Y CSS preprocessor Y eslint + std config Y Lint on save Place config for babel in package.json Save preset

cd app npm run serve localhost:8080

A benefit of Vue: hot module reloading A computed property is a reactive value calculated with JavaScript. In Vue 3, you need to wrap your properties in the setup() function and return these values. Essentially, you are telling Vue to construct this component and provide the template to these reactive computed properties.

Moustache syntax {{ }}

Note Space © 2022 — Published with Nextjs

HomeTopicsLinksDefinitionsCommandsSnippetsMy works