Skip to content

Commit

Permalink
New pbundle option "packReduxData" for SSR redux state
Browse files Browse the repository at this point in the history
  • Loading branch information
christianlent committed Feb 13, 2020
1 parent ea27b35 commit 1529a7e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/subapp-pbundle/lib/framework-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ class FrameworkLib {
await this.realizeReduxStore();
}

const packReduxData =
this.ref.subAppServer.packReduxData || this.ref.subApp.packReduxData;
if (packReduxData) {
this.initialStateStr = JSON.stringify(packReduxData(this.store));
}

return this.handleSSRSync();
}

Expand Down

0 comments on commit 1529a7e

Please sign in to comment.