4.5.1 • Published 5 years ago

@frontless/riot v4.5.1

Weekly downloads
16
License
MIT
Repository
github
Last release
5 years ago

Build Status

frontless-riot

Riot.JS build with dependency injection for globals like document or Node. Main purpose is to avoid concurent access to global variables when rendering components on the server side inside async functions or promises.

References

Cases when concurrent access happens on backend: 1. Concurrency in Node.JS 2. Async/Await Hell

For frontend guys : Wait don't touch that

Usage

  npm i @frontless/riot
import * as riot from '@frontless/riot'
import {JSDOM} from 'jsdom'
import MyTag from 'mytag.riot'

riot.register('mytag', MyTag)

async render(){
  const {document, Node} = new JSDOM().window;
  const root1 = document.createElement('div')
  document.body.appendChild(root1)
  const result = riot.di({document, Node}).mount(root1, {}, 'random')
}
4.5.1

5 years ago

4.4.0

5 years ago

4.3.8

5 years ago

4.3.7

5 years ago

4.3.6

5 years ago

4.3.5

5 years ago

4.3.4

5 years ago

4.3.2

5 years ago