Server-side rendering

Riot supports server-side rendering with Node.js. You can require components and render them:

  1. const render = require('@riotjs/ssr')
  2. const Timer = require('timer.riot')
  3. const html = render('timer', Timer, { start: 42 })
  4. console.log(html) // <timer><p>Seconds Elapsed: 42</p></timer>