开发者社区> 镜像站> NPM> @airglow/plugin-saga
@airglow/plugin-saga
A redux-saga plugin for airglow.
Last updated 2 months ago by dgrossen .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @airglow/plugin-saga 
SYNC missed versions from official npm registry.

Airglow Saga Plugin

An Airglow plugin that adds Redux Saga middleware layer to your application.

Usage

To enable, simply add the plugin:

import sagaPlugin from '@airglow/plugin-saga';

const App = () => (
  <Airglow plugins={{
    sagaPlugin({ locales })
  }}>
    <AppContainer />
  </Airglow>
);

Adding Sagas

When Bootstraping a UI or initilizting your app, you can add new sagas:

import sagas from './sagas';

const Wrapper = props => (
  <AirglowWrapper
    config={{
      name: 'sample',
      sagas
    }}
  >
    <UIContainer {...props} />
  </AirglowWrapper>
);

Saga Plugin Feature

By adding the Saga Plugin, you enable a new plugin feature. Other plugins may now use the SAGA plugin hook to register their own sagas:

import { SAGA } from '@airglow/plugin-saga';
import { sagas } from 'custom-airglow-plugin';

export default function plugin() {
  return (engine) => {
    ...
    engine.plugin(SAGA, sagas);
  };
}

Here we are registering our custom plugin's sagas so they can respond to Redux dispatches.

Current Tags

  • 0.8.0                                ...           latest (2 months ago)

13 Versions

  • 0.8.0                                ...           2 months ago
  • 0.7.0                                ...           7 months ago
  • 0.6.2                                ...           7 months ago
  • 0.6.1                                ...           7 months ago
  • 0.6.0                                ...           7 months ago
  • 0.5.2                                ...           8 months ago
  • 0.5.0                                ...           a year ago
  • 0.4.0                                ...           2 years ago
  • 0.3.3                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 39
Dependencies (2)
Dev Dependencies (2)
Dependents (0)
None