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

中途半端な SSR をやめる #65

Open
SSlime-s opened this issue Apr 10, 2023 · 0 comments
Open

中途半端な SSR をやめる #65

SSlime-s opened this issue Apr 10, 2023 · 0 comments

Comments

@SSlime-s
Copy link
Owner

現状は userId を取得するために、ほぼすべてのページで SSR している

けど、よく考えたら全部で getServerSideProps で取る必要はなくて、SPA みたいに /api/whoami とか生やしてフロントで認証見に行っていい

なので、

  1. prefetch をちゃんとして SSR する意味を増やす
  2. SSG に切り替えて SPA みたいにする

を各ページでやりたい

/all, /favorite, /edit, /user
はメイン部分を全部フロントで取って SSG に切り替えれそう
ただ、prefetch するようにして SSR でもいい

/theme/[id] は SSR 必須

ここらへん app dir いい感じに使えるとめちゃいい感じなんだろうな

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant