Skip to content
Render regain tree to string.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.babelrc
.gitignore
.npmignore
LICENSE
README.md
package.json

README.md

rogain-render-string

Render a Rogain tree into html using string concatination. Useful for server rendering.

Example

import tree from './template.json';
import data from './data.json';

document.body.innerHTML = renderToString(resolveTree(tree, data, options));

renderToString(tree, props, options)

Renders a tree with a given set of properies.

tree

Object in Rogain tree format.

props

Object.

options

options.components optional rogain-registry instance. defines components used in resolution.

Install

With npm do:

npm install rogain-render-string

License

MIT

You can’t perform that action at this time.