react-server-render
Render React Component with pre environment setting and custom function.
npm install --save react-server-side-render
Useage
;const RenderService = ;RenderService;var markupDone = RenderService;
- componentPath: Location of your component.
- props: which is the "this.state.props", your data entry.
- beforeRender: Function which will run before React server render, will return a object.
- afterRender: Fucntion which trigger after render success.
- Two parameters: markup is the result of React render static html, option is the return object of beforeRender function.
- render() will return afterRender().
Simple Useage
;const RenderService = ;RenderService; var markupDone = RenderService; // markupDone is the result of render static html.