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
In example I see that you use getInitialProps function. But in the official doc there is an info that it's better to use getStaticProps and getServerSideProps.
I downloaded your example, installed last version of next, replaced getInitialProps -> getStaticProps and started an app.
A custom server will remove important performance optimizations, like serverless functions and Automatic Static Optimization.
If I am right, it's exactly what this library do - replace next's server with custom one (from nest js).
So, am I right that if I choose this library, then there will be no ways to cache generated pages and I will have to render it on every request?
Or maybe you have some ideas and in the future versions you are going to implement it?
The text was updated successfully, but these errors were encountered:
getServerSideProps works and can replace the getInitialProps call ; however, I am unsure if getStaticProps will work. I would be curious to see if it works with the beta passthrough feature.
It is worth clarifying that everything works fine with server rendering. This problem occurs when switching between pages and requests like /_next/data/development/Main.json
In example I see that you use getInitialProps function. But in the official doc there is an info that it's better to use getStaticProps and getServerSideProps.
I downloaded your example, installed last version of next, replaced getInitialProps -> getStaticProps and started an app.
What I see? The argument is empty object.
After that I opened this official doc (https://nextjs.org/docs/advanced-features/custom-server) and found the next info:
If I am right, it's exactly what this library do - replace next's server with custom one (from nest js).
So, am I right that if I choose this library, then there will be no ways to cache generated pages and I will have to render it on every request?
Or maybe you have some ideas and in the future versions you are going to implement it?
The text was updated successfully, but these errors were encountered: