You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a dashboard section in my next app I want to serve as a static page.
The dashboard implements client-side routing so I have paths like /dashboard/path/../to
So my folder structure is pages/dashboard/[...all].js and that file handles the routing
The dashboard needs some data I am currently fetching with getInitialProps. But in this way the page is interpreted as server side rendered.
Since the data is always the same (for every user) I am trying to use getStaticProps to serve the page as static.
But due to the folder structure next thinks I need the parameters to fetch data so I must provide a getStaticPaths function and since [...all] changes every time my page will be rendered again on each request.
Does anyone know how to solve the issue or some workaround?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I have a dashboard section in my next app I want to serve as a static page.
The dashboard implements client-side routing so I have paths like
/dashboard/path/../to
So my folder structure is
pages/dashboard/[...all].js
and that file handles the routingThe dashboard needs some data I am currently fetching with getInitialProps. But in this way the page is interpreted as server side rendered.
Since the data is always the same (for every user) I am trying to use getStaticProps to serve the page as static.
But due to the folder structure next thinks I need the parameters to fetch data so I must provide a getStaticPaths function and since
[...all]
changes every time my page will be rendered again on each request.Does anyone know how to solve the issue or some workaround?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions