Skip to content

Sync with react.dev @ e9a7cb1b #482

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

Open
wants to merge 55 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
73d7073
fix: correct overlay highlighting in code examples (#7669)
mrbadri May 15, 2025
4a7bdc1
fix: the value property of checkbox to the checked property (#7804)
kosh-jp May 16, 2025
ae4a40a
No need for useState here — useCounter handles the state internally (…
gbhardwaj00 May 16, 2025
a73055f
docs: fix misplaced prepositional phrase error (#7799)
mehmetmalli May 16, 2025
e2d9fd7
Fix wrong documentation for effect events (#7800)
gbhardwaj00 May 16, 2025
b92bb59
Remove stray console.log and image (#7814)
rickhanlonii May 16, 2025
b3b2166
fix(template): remove unnecessary import of React in template code (#…
dahoho May 16, 2025
9fb0519
fix(reference): correct singular form of 'Server Functions' to 'Serve…
dahoho May 16, 2025
69ce5d3
Add bold mono font (#7815)
rickhanlonii May 16, 2025
8b2fe2b
Remove TODO comments and convert them to issues (#7743)
BartoszKlonowski May 16, 2025
00587d6
Add example of `useActionState` handling execution order (#7733)
ajits01 May 16, 2025
79e1c48
docs: update vite link (#7784)
bornkiss May 16, 2025
c289cd0
docs: add bsky link (#7781)
bornkiss May 16, 2025
7ab1969
React Montreal Meetings have a new link (#7809)
EricCote May 16, 2025
f275c9d
fix: remove useless content (#6615)
loveloki May 17, 2025
0b68054
fix: wrong verb tense in doc (#7818)
aalhoura May 17, 2025
65d297e
fix: typo in challenge solution (#7816)
aalhoura May 17, 2025
f15830d
Use experiemental in all uEE doc sandboxes (#7820)
rickhanlonii May 20, 2025
2571aee
Author: Josh Story <[email protected]>
gnoff May 21, 2025
3ee3a60
Fix wrong explanation in preserving-and-resetting-state (#6043)
smikitky May 26, 2025
9db23d6
fix: correct broken WAI-ARIA modal dialog link in createPortal refere…
dimatitov Jun 2, 2025
bbcb9af
Update meetups.md adding React Rajasthan Community (#7831)
shubhamui Jun 2, 2025
a2d17d1
Update components-and-hooks-must-be-pure.md (#7830)
ExercitusMortem Jun 2, 2025
94424ae
Update referencing-values-with-refs.md (#7829)
cHaLkdusT Jun 2, 2025
172f0b9
Add uwu click animation (#7822)
Jinsoo1004 Jun 2, 2025
3dcc4c4
Fix typo and clarily that a server function reference is created only…
kapantzak Jun 2, 2025
06965de
Add React Alicante 2025 to Conferences page (#7674)
mikedidomizio Jun 2, 2025
e901790
fix: use const where applicable in examples for keeping components pu…
ad1992 Jun 2, 2025
87cef4a
Remove `forwardRef` reference from API listing (#7837)
kassens Jun 3, 2025
c60173f
docs: Refactor context provider usage (#7793)
nannany Jun 3, 2025
37b09ea
fix: typo in docs on prerendering (#7823)
yeskunall Jun 3, 2025
5927c4e
Replace Context.Provider with Context (#7838)
kassens Jun 3, 2025
5dca520
fix(blog): resolve typo in React 19 blog post (`refs` → `ref`s) (#7828)
amir78729 Jun 3, 2025
50d6991
Update analyze_comment.yml (#7840)
jtn-dev Jun 6, 2025
82f2863
Fix #6915: typo fix (#6917)
Rekl0w Jun 28, 2025
741e8d9
fix: update ids to point to right part of the docs (#7854)
yeskunall Jun 28, 2025
c0c955e
chore: remove unused date-fns (#7856)
noritaka1166 Jun 28, 2025
b79ad22
chore: fix typo in resource and metadata components documentation (#7…
Rekl0w Jul 2, 2025
341c312
fix: correct typo in scaling-up-with-reducer-and-context.md (#7390)
bcdipesh Jul 2, 2025
4846020
fix flushSync link (#7862)
rickhanlonii Jul 9, 2025
84a5696
docs(react): fix grammar in forward ref deprecation message (#7864)
SimonSchick Jul 10, 2025
e245b77
[be] Add deadlinks script (#7879)
poteto Jul 18, 2025
d52b3ec
Fix deadlinks (#7880)
poteto Jul 18, 2025
8ad6c60
Revert "Fix deadlinks (#7880)" (#7881)
poteto Jul 21, 2025
79eb0c5
Update deadlinks script to take into account redirects (#7882)
poteto Jul 21, 2025
aa5448d
Fix deadlinks take 2 (#7883)
poteto Jul 21, 2025
b165e71
[compiler] Rewrite React Compiler Docs (#7868)
poteto Jul 21, 2025
d7160a8
[compiler] Fix misleading code example (#7889)
poteto Jul 21, 2025
b462664
[compiler] Flesh out incremental adoption intro more (#7890)
poteto Jul 21, 2025
b6450e8
[compiler] Add note about gating evaluation (#7891)
poteto Jul 21, 2025
e07ac94
Remove non-existent meetup group (Edinburgh, Scotland) (#7895)
melanterite Jul 25, 2025
1a6b2bb
Fixes animation jank on hover (#7904)
wesbos Aug 6, 2025
b092216
fix: box-shadow animation on community (#7905)
ChezFre Aug 7, 2025
e9a7cb1
Updates to Activity docs (#7884)
samselikoff Aug 8, 2025
1e532ad
merging all conflicts
react-translations-bot Aug 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions scripts/deadLinkChecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ const anchorMap = new Map(); // Map<filepath, Set<anchorId>>
const contributorMap = new Map(); // Map<anchorId, URL>
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
const redirectMap = new Map(); // Map<source, destination>
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
const redirectMap = new Map(); // Map<source, destination>
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
const redirectMap = new Map(); // Map<source, destination>
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983
let errorCodes = new Set();

async function readFileWithCache(filePath) {
Expand Down Expand Up @@ -170,11 +174,14 @@ async function validateLink(link) {
return {valid: true};
}

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
=======
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983
// Check for redirects
if (redirectMap.has(urlWithoutAnchor)) {
const redirectDestination = redirectMap.get(urlWithoutAnchor);
Expand All @@ -191,10 +198,13 @@ async function validateLink(link) {
return validateLink(redirectedLink);
}

<<<<<<< HEAD
<<<<<<< HEAD
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983
// Check if it's an error code link
const errorCodeMatch = urlWithoutAnchor.match(/^\/errors\/(\d+)$/);
if (errorCodeMatch) {
Expand Down Expand Up @@ -329,6 +339,7 @@ async function fetchErrorCodes() {
const codes = await response.json();
errorCodes = new Set(Object.keys(codes));
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
console.log(chalk.gray(`Fetched ${errorCodes.size} React error codes\n`));
=======
Expand All @@ -337,16 +348,22 @@ async function fetchErrorCodes() {
=======
console.log(chalk.gray(`Fetched ${errorCodes.size} React error codes`));
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
console.log(chalk.gray(`Fetched ${errorCodes.size} React error codes`));
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983
} catch (error) {
throw new Error(`Failed to fetch error codes: ${error.message}`);
}
}

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
=======
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983
async function buildRedirectsMap() {
try {
const vercelConfigPath = path.join(__dirname, '../vercel.json');
Expand All @@ -371,23 +388,30 @@ async function buildRedirectsMap() {
}
}

<<<<<<< HEAD
<<<<<<< HEAD
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983
async function main() {
const files = getMarkdownFiles();
console.log(chalk.gray(`Checking ${files.length} markdown files...`));

await fetchErrorCodes();
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
await buildRedirectsMap();
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
await buildRedirectsMap();
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
await buildRedirectsMap();
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983
await buildContributorMap();
await buildAnchorMap(files);

Expand All @@ -399,12 +423,16 @@ async function main() {
if (deadLinks.length > 0) {
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
console.log('\n');
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
console.log('\n');
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
console.log('\n');
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983
for (const link of deadLinks) {
console.log(chalk.yellow(`${link.file}:${link.line}:${link.column}`));
console.log(chalk.reset(` Link text: ${link.text}`));
Expand Down
29 changes: 16 additions & 13 deletions src/components/Layout/HomeContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -765,9 +765,7 @@ function CommunityGallery() {
}, []);

return (
<div
ref={ref}
className="relative flex overflow-x-hidden overflow-y-visible w-auto">
<div ref={ref} className="relative flex overflow-x-clip w-auto">
<div
className="w-full py-12 lg:py-20 whitespace-nowrap flex flex-row animate-marquee lg:animate-large-marquee"
style={{
Expand All @@ -794,21 +792,26 @@ const CommunityImages = memo(function CommunityImages({isLazy}) {
<div
key={i}
className={cn(
`group flex justify-center px-5 min-w-[50%] lg:min-w-[25%] rounded-2xl relative`
`group flex justify-center px-5 min-w-[50%] lg:min-w-[25%] rounded-2xl`
)}>
<div
className={cn(
'h-auto relative rounded-2xl overflow-hidden before:-skew-x-12 before:absolute before:inset-0 before:-translate-x-full group-hover:before:animate-[shimmer_1s_forwards] before:bg-gradient-to-r before:from-transparent before:via-white/10 before:to-transparent transition-all ease-in-out duration-300',
'h-auto rounded-2xl before:rounded-2xl before:absolute before:pointer-events-none before:inset-0 before:transition-opacity before:-z-1 before:shadow-lg lg:before:shadow-2xl before:opacity-0 before:group-hover:opacity-100 transition-transform ease-in-out duration-300',
i % 2 === 0
? 'rotate-2 group-hover:rotate-[-1deg] group-hover:scale-110 group-hover:shadow-lg lg:group-hover:shadow-2xl'
: 'group-hover:rotate-1 group-hover:scale-110 group-hover:shadow-lg lg:group-hover:shadow-2xl rotate-[-2deg]'
? 'rotate-2 group-hover:rotate-[-1deg] group-hover:scale-110'
: 'group-hover:rotate-1 group-hover:scale-110 rotate-[-2deg]'
)}>
<img
loading={isLazy ? 'lazy' : 'eager'}
src={src}
alt={alt}
className="aspect-[4/3] h-full w-full flex object-cover rounded-2xl bg-gray-10 dark:bg-gray-80"
/>
<div
className={cn(
'overflow-clip relative before:absolute before:inset-0 before:pointer-events-none before:-translate-x-full group-hover:before:animate-[shimmer_1s_forwards] before:bg-gradient-to-r before:from-transparent before:via-white/10 before:to-transparent transition-transform ease-in-out duration-300'
)}>
<img
loading={isLazy ? 'lazy' : 'eager'}
src={src}
alt={alt}
className="aspect-[4/3] h-full w-full flex object-cover rounded-2xl bg-gray-10 dark:bg-gray-80"
/>
</div>
</div>
</div>
))}
Expand Down
4 changes: 4 additions & 0 deletions src/content/learn/add-react-to-an-existing-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Here's how we recommend to set it up:
2. **Specify `/some-app` as the *base path*** in your framework's configuration (here's how: [Next.js](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath), [Gatsby](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/)).
3. **Configure your server or a proxy** so that all requests under `/some-app/` are handled by your React app.

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
This ensures the React part of your app can [benefit from the best practices](/learn/creating-a-react-app#full-stack-frameworks) baked into those frameworks.
Expand All @@ -33,6 +34,9 @@ This ensures the React part of your app can [benefit from the best practices](/l
=======
This ensures the React part of your app can [benefit from the best practices](/learn/build-a-react-app-from-scratch#consider-using-a-framework) baked into those frameworks.
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
This ensures the React part of your app can [benefit from the best practices](/learn/build-a-react-app-from-scratch#consider-using-a-framework) baked into those frameworks.
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983

Many React-based frameworks are full-stack and let your React app take advantage of the server. However, you can use the same approach even if you can't or don't want to run JavaScript on the server. In that case, serve the HTML/CSS/JS export ([`next export` output](https://nextjs.org/docs/advanced-features/static-html-export) for Next.js, default for Gatsby) at `/some-app/` instead.

Expand Down
4 changes: 4 additions & 0 deletions src/content/learn/synchronizing-with-effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ Writing `fetch` calls inside Effects is a [popular way to fetch data](https://ww

This list of downsides is not specific to React. It applies to fetching data on mount with any library. Like with routing, data fetching is not trivial to do well, so we recommend the following approaches:

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
- **If you use a [framework](/learn/creating-a-react-app#full-stack-frameworks), use its built-in data fetching mechanism.** Modern React frameworks have integrated data fetching mechanisms that are efficient and don't suffer from the above pitfalls.
Expand All @@ -741,6 +742,9 @@ This list of downsides is not specific to React. It applies to fetching data on
=======
- **If you use a [framework](/learn/start-a-new-react-project#full-stack-frameworks), use its built-in data fetching mechanism.** Modern React frameworks have integrated data fetching mechanisms that are efficient and don't suffer from the above pitfalls.
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
- **If you use a [framework](/learn/start-a-new-react-project#full-stack-frameworks), use its built-in data fetching mechanism.** Modern React frameworks have integrated data fetching mechanisms that are efficient and don't suffer from the above pitfalls.
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983
- **Otherwise, consider using or building a client-side cache.** Popular open source solutions include [React Query](https://tanstack.com/query/latest), [useSWR](https://swr.vercel.app/), and [React Router 6.4+.](https://beta.reactrouter.com/en/main/start/overview) You can build your own solution too, in which case you would use Effects under the hood, but add logic for deduplicating requests, caching responses, and avoiding network waterfalls (by preloading data or hoisting data requirements to routes).

You can continue fetching data directly in Effects if neither of these approaches suit you.
Expand Down
4 changes: 4 additions & 0 deletions src/content/learn/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ TypeScript is a popular way to add type definitions to JavaScript codebases. Out

## Installation {/*installation*/}

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
All [production-grade React frameworks](/learn/creating-a-react-app#full-stack-frameworks) offer support for using TypeScript. Follow the framework specific guide for installation:
Expand All @@ -29,6 +30,9 @@ All [production-grade React frameworks](/learn/start-a-new-react-project#full-st
=======
All [production-grade React frameworks](/learn/start-a-new-react-project#full-stack-frameworks) offer support for using TypeScript. Follow the framework specific guide for installation:
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
All [production-grade React frameworks](/learn/start-a-new-react-project#full-stack-frameworks) offer support for using TypeScript. Follow the framework specific guide for installation:
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983

- [Next.js](https://nextjs.org/docs/app/building-your-application/configuring/typescript)
- [Remix](https://remix.run/docs/en/1.19.2/guides/typescript)
Expand Down
8 changes: 8 additions & 0 deletions src/content/learn/you-might-not-need-an-effect.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ There are two common cases in which you don't need Effects:
* **You don't need Effects to transform data for rendering.** For example, let's say you want to filter a list before displaying it. You might feel tempted to write an Effect that updates a state variable when the list changes. However, this is inefficient. When you update the state, React will first call your component functions to calculate what should be on the screen. Then React will ["commit"](/learn/render-and-commit) these changes to the DOM, updating the screen. Then React will run your Effects. If your Effect *also* immediately updates the state, this restarts the whole process from scratch! To avoid the unnecessary render passes, transform all the data at the top level of your components. That code will automatically re-run whenever your props or state change.
* **You don't need Effects to handle user events.** For example, let's say you want to send an `/api/buy` POST request and show a notification when the user buys a product. In the Buy button click event handler, you know exactly what happened. By the time an Effect runs, you don't know *what* the user did (for example, which button was clicked). This is why you'll usually handle user events in the corresponding event handlers.

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
You *do* need Effects to [synchronize](/learn/synchronizing-with-effects#what-are-effects-and-how-are-they-different-from-events) with external systems. For example, you can write an Effect that keeps a jQuery widget synchronized with the React state. You can also fetch data with Effects: for example, you can synchronize the search results with the current search query. Keep in mind that modern [frameworks](/learn/creating-a-react-app#full-stack-frameworks) provide more efficient built-in data fetching mechanisms than writing Effects directly in your components.
Expand All @@ -35,6 +36,9 @@ You *do* need Effects to [synchronize](/learn/synchronizing-with-effects#what-ar
=======
You *do* need Effects to [synchronize](/learn/synchronizing-with-effects#what-are-effects-and-how-are-they-different-from-events) with external systems. For example, you can write an Effect that keeps a jQuery widget synchronized with the React state. You can also fetch data with Effects: for example, you can synchronize the search results with the current search query. Keep in mind that modern [frameworks](/learn/start-a-new-react-project#full-stack-frameworks) provide more efficient built-in data fetching mechanisms than writing Effects directly in your components.
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
You *do* need Effects to [synchronize](/learn/synchronizing-with-effects#what-are-effects-and-how-are-they-different-from-events) with external systems. For example, you can write an Effect that keeps a jQuery widget synchronized with the React state. You can also fetch data with Effects: for example, you can synchronize the search results with the current search query. Keep in mind that modern [frameworks](/learn/start-a-new-react-project#full-stack-frameworks) provide more efficient built-in data fetching mechanisms than writing Effects directly in your components.
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983

To help you gain the right intuition, let's look at some common concrete examples!

Expand Down Expand Up @@ -765,6 +769,7 @@ This ensures that when your Effect fetches data, all responses except the last r

Handling race conditions is not the only difficulty with implementing data fetching. You might also want to think about caching responses (so that the user can click Back and see the previous screen instantly), how to fetch data on the server (so that the initial server-rendered HTML contains the fetched content instead of a spinner), and how to avoid network waterfalls (so that a child can fetch data without waiting for every parent).

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
**These issues apply to any UI library, not just React. Solving them is not trivial, which is why modern [frameworks](/learn/creating-a-react-app#full-stack-frameworks) provide more efficient built-in data fetching mechanisms than fetching data in Effects.**
Expand All @@ -774,6 +779,9 @@ Handling race conditions is not the only difficulty with implementing data fetch
=======
**These issues apply to any UI library, not just React. Solving them is not trivial, which is why modern [frameworks](/learn/start-a-new-react-project#full-stack-frameworks) provide more efficient built-in data fetching mechanisms than fetching data in Effects.**
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
**These issues apply to any UI library, not just React. Solving them is not trivial, which is why modern [frameworks](/learn/start-a-new-react-project#full-stack-frameworks) provide more efficient built-in data fetching mechanisms than fetching data in Effects.**
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983

If you don't use a framework (and don't want to build your own) but would like to make data fetching from Effects more ergonomic, consider extracting your fetching logic into a custom Hook like in this example:

Expand Down
4 changes: 4 additions & 0 deletions src/content/reference/react-dom/client/createRoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ When your HTML is empty, the user sees a blank page until the app's JavaScript c
<div id="root"></div>
```

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
This can feel very slow! To solve this, you can generate the initial HTML from your components [on the server or during the build.](/reference/react-dom/server) Then your visitors can read text, see images, and click links before any of the JavaScript code loads. We recommend [using a framework](/learn/creating-a-react-app#full-stack-frameworks) that does this optimization out of the box. Depending on when it runs, this is called *server-side rendering (SSR)* or *static site generation (SSG).*
Expand All @@ -218,6 +219,9 @@ This can feel very slow! To solve this, you can generate the initial HTML from y
=======
This can feel very slow! To solve this, you can generate the initial HTML from your components [on the server or during the build.](/reference/react-dom/server) Then your visitors can read text, see images, and click links before any of the JavaScript code loads. We recommend [using a framework](/learn/start-a-new-react-project#full-stack-frameworks) that does this optimization out of the box. Depending on when it runs, this is called *server-side rendering (SSR)* or *static site generation (SSG).*
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
This can feel very slow! To solve this, you can generate the initial HTML from your components [on the server or during the build.](/reference/react-dom/server) Then your visitors can read text, see images, and click links before any of the JavaScript code loads. We recommend [using a framework](/learn/start-a-new-react-project#full-stack-frameworks) that does this optimization out of the box. Depending on when it runs, this is called *server-side rendering (SSR)* or *static site generation (SSG).*
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983

</Note>

Expand Down
4 changes: 4 additions & 0 deletions src/content/reference/react-dom/client/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: Client React DOM APIs

<Intro>

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
The `react-dom/client` APIs let you render React components on the client (in the browser). These APIs are typically used at the top level of your app to initialize your React tree. A [framework](/learn/creating-a-react-app#full-stack-frameworks) may call them for you. Most of your components don't need to import or use them.
Expand All @@ -13,6 +14,9 @@ The `react-dom/client` APIs let you render React components on the client (in th
=======
The `react-dom/client` APIs let you render React components on the client (in the browser). These APIs are typically used at the top level of your app to initialize your React tree. A [framework](/learn/start-a-new-react-project#full-stack-frameworks) may call them for you. Most of your components don't need to import or use them.
>>>>>>> e07ac94bc2c1ffd817b13930977be93325e5bea9
=======
The `react-dom/client` APIs let you render React components on the client (in the browser). These APIs are typically used at the top level of your app to initialize your React tree. A [framework](/learn/start-a-new-react-project#full-stack-frameworks) may call them for you. Most of your components don't need to import or use them.
>>>>>>> e9a7cb1b6ca1659b42d81555ecef0cd554b7a983

</Intro>

Expand Down
Loading
Loading