Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions examples/with-rematch/shared/utils/withRematch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down