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 an issue tracker for language design around basic SSR, similar to handlebars or pug. Before SSR will be usable, a number of language design decisions need to be made.
Specifying MEML to be rendered
There a number of different methods that could be used to specify what MEML should be rendered.
Just use a file
Just pass a MEML file and dump an object into its scope. For example with the following MEML file.
import{page}from'meml-ssr'// Scan and parse on program startconsthome=page('./src/index.meml')app.get('/',(req,res)=>{res.send(home({page: 'Home',username: 'trickypr'}))})
import{page}from'meml-ssr'// Scan and parse on program startconst{ Home, Logout }=page('./src/index.meml')app.get('/',(req,res)=>{res.send(Home({page: 'Home',username: 'trickypr'}))// orres.send(Home('Home','trickypr'}))})
This is an issue tracker for language design around basic SSR, similar to handlebars or pug. Before SSR will be usable, a number of language design decisions need to be made.
Specifying MEML to be rendered
There a number of different methods that could be used to specify what MEML should be rendered.
Just use a file
Just pass a MEML file and dump an object into its scope. For example with the following MEML file.
Which in JS could be used like:
Would output:
Advantages:
Disadvantages:
Reuse components and exports [Preferred]
In your SSR application you can execute components at any time. For example, the following MEML:
Which in JS could be used like:
Would output:
Advantages:
Logic blocks
The following blocks will need to be implemented
(for item in array item )
Given
then
The text was updated successfully, but these errors were encountered: