ericf / express-handlebars

A Handlebars view engine for Express which doesn't suck.
BSD 3-Clause "New" or "Revised" License
2.32k stars 382 forks source link

Server side rendering? #233

Closed george-norris-salesforce closed 5 years ago

george-norris-salesforce commented 5 years ago

How is it possible to do server side rendering

<script type="application/json" id="trailmaker-init-props">
    {{{user}}}
  </script>

user is set in Express route. Upon first load of page, user is replaced with JS. How can I render it in the HTML on the server side?

https://stackoverflow.com/questions/51755690/how-to-know-when-express-handlebars-variables-have-been-replaced-in-html