React Redux Render
HTTP middleware for rendering React Redux apps on the server.
Installation
npm install --save react-redux-render
Example
server.js
;;;;;;; ; ;; const createApp = ; http;
Config Options
Option Name | Type | Description |
---|---|---|
rootComponent | Component | Your root app component. Receives the Redux Store as a single prop when rendered. |
createStore | Function | Return a new Redux store. |
renderRoot | Function | Use this instead of options.rootComponent if your app has a more complicated entry point. Receives the Redux store as a arguments and returns a string of markup. |
mapState | Function | Return an object with the shape { status, title, path, locale } . |
mapAssets | Function | Receives the Redux state and the request object as arguments returns an object with the shape { styles[], scripts[] } . |
staticRender | Boolean | Use reactDOM.renderToStaticMarkup when rendering options.rootComponent . Has no effect if options.renderRoot is specified. |
wait | Object | Pass configuration into reduxPromiseWait . |