Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const renderHTML = (store, renderProps) => {
- const components = (
- <Provider store={store}> // use redux
- <RouterContext {...renderProps} /> // the main app through `renderProps`, matched components with react router
- </Provider>
- )
- const reactHTML = ReactDOM.renderToString(components)
- return reactHTML
- }
- const app = new Koa()
- ... route matching .... (see example above)
Add Comment
Please, Sign In to add comment