Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including redux-executor with all npm packages installed. Try it out:

require("redux/package.json"); // redux is a peer dependency. var reduxExecutor = require("redux-executor")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

redux-executor v0.5.2

Redux enhancer for handling side effects.

Redux Executor

Npm version Build Status Coverage Status

Redux enhancer for handling side effects.

Warning: API is not stable yet, will be from version 1.0

Installation

Redux Executor requires Redux 3.1.0 or later.

npm install --save redux-executor

This assumes that you’re using npm package manager with a module bundler like Webpack or Browserify to consume CommonJS modules.

To enable Redux Executor, use createExecutableStore:

import { createExecutableStore } from 'redux-executor';
import rootReducer from './reducers/index';
import rootExecutor from './executors/index';

const store = createExecutableStore(
  rootReducer,
  rootExecutor
);

or if you have more complicated store creation, use createStore with createExecutorEnhancer:

import { createStore } from 'redux';
import { createExecutorEnhancer } from 'redux-executor';
import rootReducer from './reducers/index';
import rootExecutor from './executors/index';

const store = createStore(
  rootReducer,
  createExecutorEnhancer(rootExecutor)
);

Motivation

TODO

Composition

TODO

Narrowing

TODO

Code Splitting

Redux Executor provides replaceExecutor method on ExecutableStore interface (store created by Redux Executor). It's similar to replaceReducer - it changes executor and dispatches { type: '@@executor/INIT', command: true }.

Typings

If you are using TypeScript, you don't have to install typings - they are provided in npm package.

License

MIT

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free