2

I am new to NextJS, can someone explain to me the use case when I need to get the URL query parameters from server-side or client side ? or both?

I am using ssr (Server Side Rendering) because SEO is important to me, and I have a ../search?book_name=something&type=etc page that have multiple filters that will add query parameters to the exising url when clicked

Should I get the query parameters server side? or client side? or both?

yeln
  • 462
  • 2
  • 10
  • 23
  • It actually depends on your requirement. If you are fetching some data in getServerSideProps or in getInitialProps (in server) then you may want to use them. – Kaushik Mar 31 '21 at 10:47
  • is there any difference between the two? how will SEO be impacted by this? – yeln Mar 31 '21 at 10:51
  • What do you mean by "get the query parameters from server-side or client side"? Can you show a concrete example (with code) of what you're trying to achieve? – juliomalves Mar 31 '21 at 18:26

0 Answers0