D
D
djEban2022-04-21 13:09:22
Frontend
djEban, 2022-04-21 13:09:22

Which is better to use: getStaticProps or getServideSideProps?

I have a registration page that is only available if the user is not logged in. And if authorized, then there is a redirect to his profile
Question: what is better for this purpose: getServerSideProps + server redirect or getStaticProps + client redirect?
On the one hand, gssp is better, as it is more convenient, and on the other hand, gsp, since SEO optimization is better + TTFB is less

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wonderingpeanut, 2022-04-21
@wonderingpeanut

I see no reason to use SSR to generate a static page. So I would say getStaticProps would be better.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question