Commit 9c18c548 authored by Jay Cheroske's avatar Jay Cheroske Committed by Tim Neutkens

Pass an HOC to renderPage() (#2010)

* Added passing an HOC to renderPage()

* Remove gitignore
parent c689bc9f
...@@ -66,9 +66,9 @@ async function doRender (req, res, pathname, query, { ...@@ -66,9 +66,9 @@ async function doRender (req, res, pathname, query, {
// the response might be finshed on the getinitialprops call // the response might be finshed on the getinitialprops call
if (res.finished) return if (res.finished) return
const renderPage = () => { const renderPage = (enhancer = Page => Page) => {
const app = createElement(App, { const app = createElement(App, {
Component, Component: enhancer(Component),
props, props,
router: new Router(pathname, query) router: new Router(pathname, query)
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment