Skip to content

v0.20.4 - Server-side (isomorphic) rendering

Pre-release
Pre-release

Choose a tag to compare

@staltz staltz released this 25 Apr 19:02
· 3132 commits to master since this release

Introducing renderAsHTML()

When you need to render a Cycle app from the server and serve it as HTML, you use renderAsHTML(vtree$) which takes a vtree$ and outputs an Observable of HTML strings, namely html$. Then just subscribe to html$ to get the html string and send it as a response.

See the documentation for renderAsHTML().

See a complete isomorphic (server-side rendering and client-side rendering) example.

See the tests for more examples, including also custom elements rendered as HTML.