npm install --save incremental-dom-string
The string to be rendered is described with the incremental node functions, elementOpen, elementClose and text. For example, the following function:
varIncrementalDOM=require('incremental-dom-string');constoutput=IncrementalDOM.renderToString(()=>{IncrementalDOM.elementOpen('div');IncrementalDOM.text('Hello world');IncrementalDOM.elementClose('div');});console.log(output);where output would correspond to
<div>Hello world</div>