Skip to content

Commit 9c18c54

Browse files
jcherosketimneutkens
authored andcommitted
Pass an HOC to renderPage() (vercel#2010)
* Added passing an HOC to renderPage() * Remove gitignore
1 parent c689bc9 commit 9c18c54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/render.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ async function doRender (req, res, pathname, query, {
6666
// the response might be finshed on the getinitialprops call
6767
if (res.finished) return
6868

69-
const renderPage = () => {
69+
const renderPage = (enhancer = Page => Page) => {
7070
const app = createElement(App, {
71-
Component,
71+
Component: enhancer(Component),
7272
props,
7373
router: new Router(pathname, query)
7474
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy