DEV Community

loading...
Cover image for Fetch Shared Data in Next.js With Single Request

Fetch Shared Data in Next.js With Single Request

akellbl4 profile image Pavel Mineev Originally published at itnext.io Updated on ・1 min read

Take a look at caching strategies with NodeJS layer in front of Next.js

While reviewing my current project’s build process, I noticed that generating pages with getStaticProps yields many requests to one endpoint. It’s not a big problem in my case since our backend is quite fast but googling this issue showed that some people are struggling with it. For example, the issue might be serious in case of a slow database or when the backend can’t cope with 100 requests per second. So I decided to try solving this problem and improving the build time of my project.

Read more

Discussion (0)

pic
Editor guide