mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Pass an HOC to renderPage() (#2010)
* Added passing an HOC to renderPage() * Remove gitignore
This commit is contained in:
parent
c689bc9f8b
commit
9c18c548bb
|
@ -66,9 +66,9 @@ async function doRender (req, res, pathname, query, {
|
|||
// the response might be finshed on the getinitialprops call
|
||||
if (res.finished) return
|
||||
|
||||
const renderPage = () => {
|
||||
const renderPage = (enhancer = Page => Page) => {
|
||||
const app = createElement(App, {
|
||||
Component,
|
||||
Component: enhancer(Component),
|
||||
props,
|
||||
router: new Router(pathname, query)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue