Commit 5b6489eb authored by zsx's avatar zsx Committed by Tim Neutkens

Fix the bug with not passing props to wrapped element of with-rematch example (#5483)

parent f5156b22
......@@ -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 })
)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment