You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is sort of the holy grail, and it's not currently possible with multiplex-templates. Here's the problem:
While most templating languages render synchronously, some don't. Which means consolidate.js made the decision to only have an async render function. This makes sense, and allows it to support all popular js templating languages.
That being said, almost all templating languages only allow synchronous functions inside the templates themselves. Most of the exceptions are unstable, experimental versions.
The way multiplex-templates gets around this is by using the deasync library, which uses C-bindings to make async functions synchronous. This is crazy wizard magic, but works great on the server.
To get the holy grail of offline-first, client-only templating in any language, we'd have to figure out a way to either make all the templating languages allow async functions, or port deasync to the client-side, or...something.
In this ticket, I want to come up with possible solutions.
The text was updated successfully, but these errors were encountered:
This is sort of the holy grail, and it's not currently possible with
multiplex-templates
. Here's the problem:consolidate.js
made the decision to only have an async render function. This makes sense, and allows it to support all popular js templating languages.multiplex-templates
gets around this is by using the deasync library, which uses C-bindings to make async functions synchronous. This is crazy wizard magic, but works great on the server.deasync
to the client-side, or...something.The text was updated successfully, but these errors were encountered: