Skip to content

Commit

Permalink
WIP Disable SSR so it doesn't try to run Onsen's platform detection c…
Browse files Browse the repository at this point in the history
…ode which depends on `window`, see kriasoft/react-starter-kit#1737
  • Loading branch information
josephfrazier committed Oct 2, 2022
1 parent 4157e64 commit 17e0484
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,11 @@ app.get('*', async (req, res, next) => {
}

const data = { ...route };
data.children = ReactDOM.renderToString(
<App context={context}>{route.component}</App>,
);
// TODO: get Onsen working with SSR, or at least instead only running on the client
// TODO: See https://github.com/kriasoft/react-starter-kit/issues/1737
// data.children = ReactDOM.renderToString(
// <App context={context}>{route.component}</App>,
// );
data.styles = [{ id: 'css', cssText: [...css].join('') }];

const scripts = new Set();
Expand Down

0 comments on commit 17e0484

Please sign in to comment.