Server components vs. client components in modern React apps make all the difference in data fetching, loading speed and user experience. Here I discuss different aspects of server vs. client components and highlight some patterns in data fetching and state management in both types of components.
Interesting resources:
- State management in Next.js: • Video
- Misinformation on state management in server components: github.com/pmndrs/zustand/dis...
- Data fetching in server components in Next.js: nextjs.org/docs/app/building-...
- Rendering server components in client components: nextjs.org/docs/app/building-...
10 фев 2024