Skip to content

pakastin/frzr-dom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FRZR-dom

render FRZR on server side

installation

npm install frzr-dom

usage

var el = require('frzr').el;
var mount = require('frzr').mount;

var Document = require('frzr-dom').Document;
var render = require('frzr-dom').render;

...
var document = new Document();

mount(document.body, el('h1', 'Hello world!'));

console.log(render(document.body)); --> <body><h1>Hello world!</h1></body>
  • Requiring frzr-dom will create a fake DOM for FRZR.
  • Create a new document, so you don't use a global one.
  • You can then use render(view) or render(el) to produce HTML. That's it!

About

render FRZR on server side

Resources

Stars

Watchers

Forks

Packages

No packages published