Skip to content

Commit

Permalink
update sample poc-subapp
Browse files Browse the repository at this point in the history
  • Loading branch information
jchip committed Apr 10, 2020
1 parent 1b8ded1 commit 32ea6c6
Show file tree
Hide file tree
Showing 9 changed files with 207 additions and 126 deletions.
9 changes: 3 additions & 6 deletions samples/poc-subapp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ You can also control how your subapp works from server side to client side for e
Some of the attributes supported:

- `hydrate` - Enable client side hydration of initial state from server. ie: Use `React.hydrate` API.
- `streaming` - Use the streaming SSR APIs. ie: `ReactDomServer.renderToNodeStream`.
- `suspenseSsr` - Support suspense in SSR. No streaming.
- `useStream` - Use the stream SSR APIs. ie: `ReactDomServer.renderToNodeStream`.
- `suspenseSsr` - Support suspense in SSR. No stream support.

## React Router and SPA

Expand Down Expand Up @@ -195,10 +195,7 @@ const mapStateToProps = state => state;

export default reduxLoadSubApp({
name: "Home",
Component: connect(
mapStateToProps,
dispatch => ({ dispatch })
)(Home),
Component: connect(mapStateToProps, dispatch => ({ dispatch }))(Home),
reduxCreateStore(initialState) {
return createStore(reducers, initialState);
}
Expand Down
4 changes: 2 additions & 2 deletions samples/poc-subapp/TODO.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Streaming SSR [ ]
# Streaming SSR [x]

- Enable support for `renderToNodeStream`
- Enable HTTP streaming
Expand All @@ -11,7 +11,7 @@
- Store bundle load status in `window.webSubApps`
- When rendering subapp without bundle yet, dynamically load them

# Dynamic SSR [ ]
# Dynamic SSR [x]

- Allow each route and subapp to dynamically turn on/off SSR for a request

Expand Down
4 changes: 4 additions & 0 deletions samples/poc-subapp/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"use strict";
module.exports = {
extends: "@xarc/app-dev/config/babel/babelrc.js"
};
Loading

0 comments on commit 32ea6c6

Please sign in to comment.