mantra-redux

1.0.5 • Public • Published

Mantra Redux Middleware

Installation

npm install --save mantra-redux mantra-plus

Basic Usage

import redux from 'mantra-redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';

const logger = createLogger();
const middlewares = [
  thunk,
  logger,
  Client.middleware(),
];

// create a Mantra app
const app = createApp(context);

// load middlewares before loading module
app.loadMiddlewares([
  redux({
    reducers: {
      apollo: Client.reducer(),
    },
    middlewares,
  }),
]);

// load all modules
app.loadModule(coreModule);

// initialize app
app.init();

Readme

Keywords

none

Package Sidebar

Install

npm i mantra-redux

Weekly Downloads

0

Version

1.0.5

License

MIT

Last publish

Collaborators

  • sammkj