seonghyeonkimm / seonghyeonkimm.github.io

https://seonghyeonkimm.github.io/
MIT License
1 stars 0 forks source link

react ssr html streaming #9

Open seonghyeonkimm opened 2 years ago

seonghyeonkimm commented 2 years ago
seonghyeonkimm commented 2 years ago
seonghyeonkimm commented 2 years ago

[streaming ssr keynote video] https://ko.reactjs.org/blog/2021/12/17/react-conf-2021-recap.html#streaming-server-rendering-with-suspense

seonghyeonkimm commented 2 years ago

[how to understand html streaming] https://www.patterns.dev/posts/ssr/ https://github.com/GoogleChromeLabs/progressive-rendering-frameworks-samples

seonghyeonkimm commented 2 years ago

[react-query suspense for data fetching with html streaming] https://github.com/tannerlinsley/react-query/discussions/3173 https://github.com/tannerlinsley/react-query/discussions/2942 https://github.com/reactwg/react-18/discussions/121#discussioncomment-2207678

seonghyeonkimm commented 2 years ago

ssr suspense는 공식적으로는 아직 React.lazy(nextjs dynamic), react server component에서만 작동한다. nextjs에서 runtime 옵션을 추가했는데, nodejs, edge runtime이 있다. 이 두개의 동작 차이가 있다. https://github.com/vercel/next.js/discussions/34179 nodejs runtime은 streaming + selective hydration이 잘 작동 안하는 느낌이고, edge runtime은 잘 작동하는 느낌..?