Nutritious Pumpkin Meal

    fusion-redux-action-emitter-enhancer

    0.1.5 • Public • Published

    fusion-redux-action-emitter-enhancer

    Build status

    Redux store enhancer that emits actions via an injected event emitter.


    Example

    // src/main.js
    import UniversalEvents from 'fusion-plugin-universal-events';
    import Redux from 'fusion-plugin-react-redux'
    import fetch from 'unfetch';
    import reduxActionEnhancerFactory from 'fusion-redux-action-emitter-enhancer';
    import reducer from './reducers/root.js'
     
    export default function start() {
      const app = new App(root);
     
      const EventEmitter = app.plugin(UniversalEvents, {fetch});
      const enhancer = reduxActionEnhancerFactory(EventEmitter);
      app.plugin(Redux, {reducer, enhancer});
     
      return app;
    }
     
    // src/reducers/root.js
    export default (state, action) => {
      // reducer goes here
    }

    API

    The following events are emitted:

    • redux-action-emitter:action

    Keywords

    none

    Install

    npm i fusion-redux-action-emitter-enhancer

    DownloadsWeekly Downloads

    2

    Version

    0.1.5

    License

    MIT

    Last publish

    Collaborators

    • fusion-ci