Tim's Blog
  • Home
  • About
Sign in Subscribe

Vue

A collection of 2 posts
How to add Vuex to Vue project
Vue

How to add Vuex to Vue project

Vue 2 npm install vuex@3.6.2 --save Create file: src/store/index.js // store/index.js import Vuex from 'vuex' import Vue from 'vue' Vue.use(Vuex) const store = new Vuex.Store({ state: { count: 0 }, mutations: { increment (state) { state.count++ } } }) export default store In
Jan 31, 2023 1 min read
How to create Vue 2 or Vue 3 project using Vite
Frontend

How to create Vue 2 or Vue 3 project using Vite

create-vue is the recommended CLI to create a Vue project with Vite. https://github.com/vuejs/create-vue Below are the commands that ultilize create-vue to start your Vue project. Vue 3 npm init vue@3 Vue 2 npm init vue@2
Jan 31, 2023
Page 1 of 1
Tim's Blog © 2025
  • Sign up
Powered by Ghost