Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

streaming compiled html. #81

Open
iAmServerless opened this issue Jul 14, 2018 · 0 comments
Open

streaming compiled html. #81

iAmServerless opened this issue Jul 14, 2018 · 0 comments

Comments

@iAmServerless
Copy link

With the new renderToNodeStream React moved ahead by providing way to reduce TTFB and First paint.

Webpack generates assets which are appended to .hbs file using HtmlWebpackPlugin. React generate HTML on server using renderToString which is appended to .hbs using koa-hbs and sent to client.

To switch from renderToString to renderToNodeStream we need to separate .hbs in two parts, above and below some handlebar expression where react appends streaming data using renderToNodeStream.

With the current documentation of koa-hbs I do not found a way to get compiled html and take care of streaming by self.

Please expose an API to get comiled HTML or add support for streaming HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant