Vue
Install
npm install overmind overmind-vuePlugin
import { createOvermind } from 'overmind'
import { createPlugin } from 'overmind-vue'
const overmind = createOvermind({
state: {
foo: 'bar'
},
actions: {
onClick() {}
}
})
export const OvermindPlugin = createPlugin(overmind)import Vue from 'vue/dist/vue'
import { OvermindPlugin } from './overmind'
Vue.use(OvermindPlugin)
...<template>
<div @click="actions.onClick">
{{ state.foo }}
</div>
</template>Rendering
Pass state as props
Reactions
Connect
Computed
Using props
Last updated