vue-modal-redux

    2.0.1 • Public • Published

    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)
      )
    }

    Keywords

    none

    Install

    npm i vue-modal-redux

    DownloadsWeekly Downloads

    1

    Version

    2.0.1

    License

    Apache-2.0

    Last publish

    Collaborators

    • avatar