3.1.0 • Published 6 years ago

stent-dev-tools-emitters v3.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Emitters for Stent's Chrome extension

Small JavaScript files that emit events to the StentDevTools Chrome Extension.

Installation

yarn add stent-dev-tools-emitters -D or npm install stent-dev-tools-emitters -D.

Stent integration

import { Machine } from 'stent';
import StentEmitter from 'stent-dev-tools-emitters/lib/StentEmitter';

Machine.addMiddleware(StentEmitter);

Redux integration

import { createStore, applyMiddleware } from 'redux';
import ReduxEmitter from 'stent-dev-tools-emitters/lib/ReduxEmitter';

const middleware = ReduxEmitter();

const store = createStore(<reducer>, applyMiddleware(middleware));

Redux-saga integration

import { createStore, applyMiddleware } from 'redux';
import ReduxSagaEmitter from 'stent-dev-tools-emitters/lib/ReduxSagaEmitter';
import createSagaMiddleware from 'redux-saga';

const emitter = ReduxSagaEmitter();
const sagaMiddleware = createSagaMiddleware({ sagaMonitor: emitter.sagaMonitor });

const store = createStore(<reducer>, applyMiddleware(sagaMiddleware));

// This bit is really important.
// Without it you won't get the current state of the app with every event.
emitter.setStore(store);

sagaMiddleware.run(rootSaga)
3.1.0

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.1.0

6 years ago