Skip to content

Template rendering #315

Answered by JozefFlakus
JoshPolaris asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @JoshPolaris,
Could you describe more the use case in which you would like to use server side rendering?
Marble.js doesn't have any built-in mechanism (module/package) for rendering templates but it doesn't mean that it is impossible. It is just a typical HTTP flow. Generally speaking it is a matter of integrating a specific template rendering engine, like eg. mustache.js or something else, even React or other library. Nothing too complex, really. :)

export const foo$ = r.pipe(
  r.matchPath('/foo'),
  r.matchType('GET'),
  r.useEffect((req$, ctx) => {
    // lets assume that there is an already registered renderer instance in the context,
    // eg. the previously mentioned mustache.js

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JozefFlakus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants