-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Allow app component to be wrapped with custom enhancer when rendering #4762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
270987d to
c76875a
Compare
| if (ctx.query.withEnhancer) { | ||
| options = enhanceComponent | ||
| } else if (ctx.query.withEnhanceComponent) { | ||
| options = { enhanceComponent } |
There was a problem hiding this comment.
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') { |
There was a problem hiding this comment.
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
0906b3d to
c6513ba
Compare
|
Thanks! |
|
Thanks so much for picking up the slack while I'm on holiday, this looks great 🙂 |
Continuation from #4288
Fixes #4269