next-redux-saga
Advanced tools
Comparing version 4.0.2 to 4.0.3
{ | ||
"name": "next-redux-saga", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "redux-saga HOC for Next.js", | ||
"repository": "https://github.com/bmealhouse/next-redux-saga.git", | ||
"author": "Brent Mealhouse <bmealhouse@gmail.com>", | ||
"congtributors": [ | ||
"contributors": [ | ||
"Timon Borter", | ||
@@ -27,8 +27,2 @@ "Artem Abzanov", | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "xo && lint-staged", | ||
"pre-push": "xo && yarn test" | ||
} | ||
}, | ||
"jest": { | ||
@@ -120,3 +114,3 @@ "collectCoverage": true, | ||
"redux-saga": "1.0.1", | ||
"release": "6.0.0", | ||
"release": "6.1.0", | ||
"rollup": "1.1.2", | ||
@@ -123,0 +117,0 @@ "rollup-plugin-babel": "4.3.2", |
# next-redux-saga | ||
[![Build Status](https://travis-ci.org/bmealhouse/next-redux-saga.svg?branch=master)](https://travis-ci.org/bmealhouse/next-redux-saga) | ||
[![npm version](https://img.shields.io/npm/v/next-redux-saga.svg)](https://npmjs.org/package/next-redux-saga) | ||
[![npm downloads](https://img.shields.io/npm/dm/next-redux-saga.svg)](https://npmjs.org/package/next-redux-saga) | ||
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) | ||
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) | ||
[![Build Status](https://travis-ci.com/bmealhouse/next-redux-saga.svg?branch=master)](https://travis-ci.com/bmealhouse/next-redux-saga) | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg)](#contributors) | ||
@@ -38,2 +40,3 @@ | ||
import createSagaMiddleware from 'redux-saga' | ||
import {sagaStarted} from './actions' | ||
import rootReducer from './root-reducer' | ||
@@ -64,6 +67,9 @@ import rootSaga from './root-saga' | ||
* It is used to await the rootSaga task before sending results to the client. | ||
* However it should run only once - which must be regarded when using `next-redux-wrapper:^2.1.0` | ||
*/ | ||
if (!store.getState().saga.ran) { | ||
store.dispatch(sagaStarted()) | ||
store.sagaTask = sagaMiddleware.run(rootSaga) | ||
} | ||
store.sagaTask = sagaMiddleware.run(rootSaga) | ||
return store | ||
@@ -70,0 +76,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27329
153