vue-modal-redux
v2.0.1
Published
modal manager for vue+redux
Downloads
8
Readme
vue-modal-redux(3) -- simple modals for redux+vue
// App.vue
import Vue from 'vue'
import {ModalView} from 'vue-modal-redux'
new Vue({
components: {
// ...
ModalView
// ...
},
template: '<!-- ... --><modal-view name="default" /><!-- ... -->'
})
// store/index.js
import modalMiddleware from 'vue-modal-redux/middleware'
import modals from 'vue-modal-redux/reducers'
import {applyMiddleware, combineReducers} from 'redux'
/**
* set up
*/
const configureStore = () => {
const middleware = [modalMiddleware, /* ... */]
return createStore(
combineReducers({modals}),
applyMiddleware(...middleware)
)
}