diff --git a/docs/guides/subapps.md b/docs/guides/subapps.md index d5bfc5da2..00c5996bf 100644 --- a/docs/guides/subapps.md +++ b/docs/guides/subapps.md @@ -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 }); } }); ``` diff --git a/packages/create-app/template/src/demo2/subapp-demo2.js b/packages/create-app/template/src/demo2/subapp-demo2.js index de51d4e97..b72756dbe 100644 --- a/packages/create-app/template/src/demo2/subapp-demo2.js +++ b/packages/create-app/template/src/demo2/subapp-demo2.js @@ -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 }); } });