Skip to content

Repository files navigation

react-render

Build Status

Handles the simple use case of importing a component and rendering it to markup.

Installation

npminstallreact-render

Usage

constreactRender=require('react-render');reactRender({// An absolute path to a module exporting your componentpath: '/abs/path/to/component.js',// Optional// --------// A string containing a JSON-serialized object which will be used// during renderingserialisedProps: '...',// An object which will be used during renderingprops: {},// A flag indicating if you wish to render the component to static// markup. Defaults to false.toStaticMarkup: true,// A flag indicating if you wish to disable caching for components. This is// especially useful in development. Defaults to false.noCache: false},function(err,markup){if(err)throwerr;console.log(markup);});

About

React rendering wrapper

Resources

Stars

21 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages