Skip to content

Commit

Permalink
fix: correct prepare args (#1598)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdaringe authored Apr 11, 2020
1 parent b73118b commit 8bc5213
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/guides/subapps.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ export default reduxLoadSubApp({
Component: connect(mapStateToProps, dispatch => ({ dispatch }))(Demo2),
name: "Demo2",
reduxReducers,
prepare: ({ initialData }) => {
return Promise.resolve(initialData || { value: 999 });
prepare: ({ context, request }) => {
return Promise.resolve({ value: 999 });
}
});
```
Expand Down
4 changes: 2 additions & 2 deletions packages/create-app/template/src/demo2/subapp-demo2.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default reduxLoadSubApp({
Component: connect(mapStateToProps, dispatch => ({ dispatch }))(Demo2),
name: "Demo2",
reduxReducers,
prepare: ({ initialData }) => {
return Promise.resolve(initialData || { value: 999 });
prepare: ({ context, request }) => {
return Promise.resolve({ value: 999 });
}
});

0 comments on commit 8bc5213

Please sign in to comment.