Skip to content

Conversation

@albinekb
Copy link
Contributor

@albinekb albinekb commented Jul 11, 2018

Continuation from #4288

Fixes #4269

@albinekb albinekb force-pushed the render-page-enhancer branch from 270987d to c76875a Compare July 11, 2018 13:25
if (ctx.query.withEnhancer) {
options = enhanceComponent
} else if (ctx.query.withEnhanceComponent) {
options = { enhanceComponent }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also test enhanceApp

const renderPage = (options = Page => Page) => {
let EnhancedApp = App
let EnhancedComponent = Component
if (typeof options === 'function') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets add a comment here that this is for backwards compatibility

@timneutkens timneutkens merged commit 992ea2e into vercel:canary Jul 13, 2018
@timneutkens
Copy link
Member

Thanks!

@albinekb albinekb deleted the render-page-enhancer branch July 13, 2018 15:44
@Tapppi
Copy link

Tapppi commented Jul 24, 2018

Thanks so much for picking up the slack while I'm on holiday, this looks great 🙂

@lock lock bot locked as resolved and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature request: renderPage can pass props to App component directly

3 participants