提交 9c18c548 编写于 作者: J Jay Cheroske 提交者: Tim Neutkens

Pass an HOC to renderPage() (#2010)

* Added passing an HOC to renderPage()

* Remove gitignore
上级 c689bc9f
......@@ -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)
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册