diff --git a/examples/with-rematch/shared/utils/withRematch.js b/examples/with-rematch/shared/utils/withRematch.js index 5b6b9468..90ec319b 100644 --- a/examples/with-rematch/shared/utils/withRematch.js +++ b/examples/with-rematch/shared/utils/withRematch.js @@ -23,13 +23,12 @@ const getOrCreateStore = (initStore, initialState) => { export default (...args) => Component => { // First argument is initStore, the rest are redux connect arguments and get passed const [initStore, ...connectArgs] = args + // Connect page to redux with connect arguments + const ConnectedComponent = connect.apply(null, connectArgs)(Component) const ComponentWithRematch = (props = {}) => { const { store, initialProps, initialState } = props - // Connect page to redux with connect arguments - const ConnectedComponent = connect.apply(null, connectArgs)(Component) - // Wrap with redux Provider with store // Create connected page with initialProps return React.createElement(