Server Component とは?
server component はサーバー上でのみ実行され、そのコードをブラウザに送信しないコンポーネントです。データを読み取ったりサーバーリソースに直接アクセスしたりして、レンダリング済みの出力をクライアントへ送信できます。JavaScript がサーバーに留まるため、クライアント bundle には一切寄与しません。
なぜ重要か
server component はデータ取得や重いレンダリングをクライアントから移し、bundle を小さくし、バックエンドデータへのアクセスを簡素化します。インタラクティブな部分では client component と組み合わせて使われます。
関連ガイド
What Is a Client Component?A client component is a UI component whose JavaScript ships to the browser and runs there, enabling state, ef…
What Is a Server Action?A server action is a server-side function a client can invoke directly to mutate data, letting forms run back…
What Is Partial Hydration?Partial hydration attaches client behavior to only the interactive parts of a server-rendered page, leaving s…