Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixnut vela loadingov, actually sa zamysliet nad viac server-side fetchovanim #555

Open
rtrembecky opened this issue Dec 17, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@rtrembecky
Copy link
Collaborator

aktualny stav (skoro) hocijakej stranky:

  • v server-side renderi (a teda prvom client renderi) je loading (je to initial state useQuery)
  • pusti sa network request
  • zobrazime nove data
  • nevyhody: loading, neexistencia textov v prvom renderi (zle SEO)

lepsi a spravnejsi stav:

  • server urobi request na data, ktore pre stranku potrebuje (getServerSideProps funkcia, vrati props pre stranku)
  • server-side (aj client) render cita data z props a zobrazi ich
  • nevyhody: dlhsi response time HTMLka stranky (caka na server request)
  • vyhody: ziadny dalsi client request, ziadny loading, a server request ide v ramci serveru, takze rychlejsie

asi globalne takto nejako: https://tanstack.com/query/latest/docs/framework/react/guides/ssr#using-the-hydration-apis

@rtrembecky rtrembecky added this to the 3.0 milestone Dec 17, 2024
@rtrembecky rtrembecky self-assigned this Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant