mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
* Bump `eslint-plugin-react`
* Add `eslint-config-xo-react`
* Add XO
* Remove eslint-related dependencies, add XO config and use XO as the linter
* Code style: Standard => XO ✨
* Use xo property to ignore files
* Fix remaining errors
15 lines
435 B
JavaScript
15 lines
435 B
JavaScript
// simple redux middleware that executes
|
|
// the `effect` field if provided in an action
|
|
// since this is preceded by the `plugins`
|
|
// middleware, it allows authors to interrumpt,
|
|
// defer or add to existing side effects at will
|
|
// as the result of an action being triggered
|
|
|
|
export default () => next => action => {
|
|
const ret = next(action);
|
|
if (action.effect) {
|
|
action.effect();
|
|
delete action.effect;
|
|
}
|
|
return ret;
|
|
};
|