next-redux-wrapper
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "next-redux-wrapper", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Redux wrapper for Next.js", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -44,4 +44,4 @@ var React = require('react'); | ||
var initialState = props.initialState; | ||
var initialProps = props.initialProps; | ||
var initialState = props.initialState || {}; | ||
var initialProps = props.initialProps || {}; | ||
var hasStore = props.store && props.store.dispatch && props.store.getState; | ||
@@ -57,3 +57,3 @@ var store = hasStore | ||
Object.keys(props).forEach(function(p) { if (!~skipMerge.indexOf(p)) mergedProps[p] = props[p]; }); | ||
Object.keys(initialProps).forEach(function(p) { mergedProps[p] = initialProps[p]; }); | ||
Object.keys(initialProps || {}).forEach(function(p) { mergedProps[p] = initialProps[p]; }); | ||
@@ -60,0 +60,0 @@ return React.createElement( //FIXME This will create double Provider for _document case |
@@ -80,2 +80,12 @@ import React from "react"; | ||
await verifyComponent(WrappedPage); | ||
}); | ||
test('simple props', () => { | ||
const App = ({foo}) => (<div>{foo}</div>); | ||
const WrappedApp = wrapper(makeStore, state => state)(App); | ||
const component = renderer.create(<WrappedApp foo="foo"/>); | ||
expect(component.toJSON()).toMatchSnapshot(); | ||
}); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10101
146
0