mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Fix the bug with not passing props to wrapped element of with-rematch example (#5483)
This commit is contained in:
parent
f5156b2297
commit
5b6489ebf3
|
@ -27,7 +27,7 @@ export default (...args) => Component => {
|
|||
const ConnectedComponent = connect.apply(null, connectArgs)(Component)
|
||||
|
||||
const ComponentWithRematch = (props = {}) => {
|
||||
const { store, initialProps, initialState } = props
|
||||
const { store, initialProps, initialState, ...others } = props
|
||||
|
||||
// Wrap with redux Provider with store
|
||||
// Create connected page with initialProps
|
||||
|
@ -39,7 +39,7 @@ export default (...args) => Component => {
|
|||
? store
|
||||
: getOrCreateStore(initStore, initialState)
|
||||
},
|
||||
React.createElement(ConnectedComponent, initialProps)
|
||||
React.createElement(ConnectedComponent, { ...initialProps, ...others })
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue