React Foundations: Server and Client Components | Next.js
To understand how Server and Client Components work, it's helpful to be familiar with two foundational web concepts: In the context of web applications: Each environment has its own set of capabilities and constraints. For example, by moving rendering and data fetching to the server, you can reduce the amount of code sent to the client, which can improve your application's performance. But, as you learned earlier, to make your UI interactive, you need to update the DOM on the client. Therefore, the code you write for the server and the client is not always the same. Certain operations (e.g. data fetching or managing user state) are better suited for one environment over the other. The Network Boundary is a conceptual line that separates the different environments. In React, you choose where to place the network boundary in your component tree. For example, you can fetch data and render a user's posts on the server (using Server Components), then render the interactive LikeButton for ea
10 Chapter 10 Server and Client Components To understand how Server and Client Components work, it's helpful to be familiar with two foundational web concepts: The environments your application code can be executed in: the server and the client. The network boundary that separates server and client code. Server and Client Environments In the context of web applications: The client refers to the browser on a user’s device that sends a request to a server for your application code. It then turns the response it receives from the server into an interface the user can interact with. The server ref
Explore this link on the map →related reading
- Making Sense of React Server Components • Josh W. Comeaujoshwcomeau.com
- Getting Started: Server and Client Components | Next.jsnextjs.org
- Server Components – Reactreact.dev
- Navigating the future of frontendfrontendmastery.com
- We migrated 50,000 lines of code to React Server Componentsmux.com
- Getting Started: Fetching Data | Next.jsnextjs.org
- Getting Started: Fetching Data | Next.jsnextjs.org
- Web Applications 101 - Robin Wieruchrobinwieruch.de
- The Two Reacts — overreactedoverreacted.io
- One Year with Next.js App Router — Why We're Moving Onpaperclover.net
- Building a single-page application with Next.js and React Routercolinhacks.com
- Getting Started: Fetching Data | Next.jsnextjs.org