4.0.0 • Published 6 years ago

react-render v4.0.0

Weekly downloads
1,649
License
MIT
Repository
github
Last release
6 years ago

react-render

Build Status

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

Installation

npm install react-render

Usage

const reactRender = require('react-render');

reactRender({

  // An absolute path to a module exporting your component
  path: '/abs/path/to/component.js',

  // Optional
  // --------

  // A string containing a JSON-serialized object which will be used
  // during rendering
  serialisedProps: '...',

  // An object which will be used during rendering
  props: {},

  // 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) throw err;

  console.log(markup);
});
4.0.0

6 years ago

3.0.0

7 years ago

2.0.0

7 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.3.0

10 years ago

0.2.4

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago