Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

next-redux-saga

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-redux-saga - npm Package Compare versions

Comparing version 4.0.3 to 4.1.0

8

package.json
{
"name": "next-redux-saga",
"version": "4.0.3",
"version": "4.1.0",
"description": "redux-saga HOC for Next.js",

@@ -32,2 +32,7 @@ "repository": "https://github.com/bmealhouse/next-redux-saga.git",

"<rootDir>/jest.setup.js"
],
"coveragePathIgnorePatterns": [
"/node_modules/",
"package.json",
"yarn.lock"
]

@@ -103,2 +108,3 @@ },

"jest": "24.1.0",
"jest-express": "1.10.1",
"lint-staged": "8.1.3",

@@ -105,0 +111,0 @@ "next": "7.0.2",

13

README.md

@@ -40,7 +40,6 @@ # next-redux-saga

import createSagaMiddleware from 'redux-saga'
import {sagaStarted} from './actions'
import rootReducer from './root-reducer'
import rootSaga from './root-saga'
function configureStore(preloadedState) {
function configureStore(preloadedState, {isServer, req = null}) {

@@ -65,8 +64,10 @@ /**

/**
* next-redux-saga depends on `sagaTask` being attached to the store.
* next-redux-saga depends on `sagaTask` being attached to the store during `getInitialProps`.
* 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`
* However, next-redux-wrapper creates two server-side stores per request:
* One before `getInitialProps` and one before SSR (see issue #62 for details).
* On the server side, we run rootSaga during `getInitialProps` only:
*/
if (!store.getState().saga.ran) {
store.dispatch(sagaStarted())
if (req || !isServer) {
store.sagaTask = sagaMiddleware.run(rootSaga)

@@ -73,0 +74,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc