Skip to content

Instantly share code, notes, and snippets.

View techwizzdom's full-sized avatar

Domagoj Lalk Vidovic techwizzdom

View GitHub Profile
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
count: 0
},
mutations: {
const userModule = {
namespaced: true,
state: () => ({}),
mutations: {},
actions: {},
getters: {}
}
const organisationModule = {
namespaced: true,
const userModule = {
namespaced: true,
state: () => ({}),
mutations: {},
actions: {
'SET_USER'() {},
'SET_USER_LOCATION'() {}
},
getters: {}
}
// userModule.js
export const SET_USER = 'SET_USER'
export const SET_USER_LOCATION = 'SET_USER_LOCATION'
const userModule = {
namespaced: true,
state: () => ({}),
mutations: {},
actions: {
[SET_USER]() {},
// actions
export const SET_USER = 'SET_USER'
export const SET_USER_LOCATION = 'SET_USER_LOCATION'
// mutations
// getters
import { SET_USER, SET_USER_LOCATION } from './types.js'
export default {
[SET_USER]() {},
[SET_USER_LOCATION]() {}
}
import actions from './actions.js'
import mutations from './mutations.js'
import getters from './getters.js'
const state = {}
export default {
namespaced: true,
state,
actions,
import Vue from 'vue'
import Vuex from 'vuex'
// Modules import
import UserModule from 'modules/user'
import OrganisationModule from 'modules/organisation'
Vue.use(Vuex)
const state = {}
.your-class-name {
display: flex;
justify-content: center;
align-items: center;
}
.your-class-name {
margin-top: 16px;
margin-right: 12px;
margin-bottom: 16px;
}
// shorthand
.your-class-name {
margin: 16px 12px;
}