Replies: 4 comments 2 replies
-
Why did you close this? I have the same issue!
Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi Toine, I've reopened the issue. |
Beta Was this translation helpful? Give feedback.
-
Do you have an example of this maybe? |
Beta Was this translation helpful? Give feedback.
-
Below is my working solution for this issue. export default function withLayout (PageComponent, headerBgColor) {
} Using getStaticProps in a functional page component - `import React from 'react' // This gets called at build time } const Index= (props) => {...} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a next.js (9.3.5) application and I'm using a HOC for page layouts. But on pages where I need to prefetch data, getStaticProps is not working with HOC exported pages.
Steps To Reproduce
Expected behavior
Prefetched data must be passed to the page as props while using HOC.
I have plans to use more HOC from redux and router in future so this stays a big concern for me.
Beta Was this translation helpful? Give feedback.
All reactions