Skip to content
This repository has been archived by the owner on Nov 21, 2018. It is now read-only.

deprecate/incremental-dom-string

Repository files navigation

Incremental DOM string

Setup

npm install --save incremental-dom-string

Usage

The string to be rendered is described with the incremental node functions, elementOpen, elementClose and text. For example, the following function:

var IncrementalDOM = require('incremental-dom-string');

const output = IncrementalDOM.renderToString(() => {
  IncrementalDOM.elementOpen('div');
    IncrementalDOM.text('Hello world');
  IncrementalDOM.elementClose('div');
});

console.log(output);

where output would correspond to

<div>Hello world</div>

About

Ability to render Incremental DOM virtual elements into strings on the server and the client

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published