Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

82
Views
Is this the correct way to use useSWR with getServerSideProps in next js?

This is the code sandbox example of how I'm using SWR with getServerSideProps: https://codesandbox.io/s/useswr-with-getserversideprops-nextjs-9u1gp?file=/containers/PostContainer/index.js

Here is github repo for same: repo

What I want to achieve is on the post/[post] page the meta tags will be dynamic coming from the backend & will be users specific that's why I'm using getServerSideProps instead of getStaticProps, the above code is working fine but when I see the terminal on clicking a post it's calling the API 3 times & when I again click the same post API is being called 2 times is this normal behaviour?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!