From 5f17ce5e98c4aa02f9da7437a6e73ab175ee8d6b Mon Sep 17 00:00:00 2001 From: Alessandro De Blasis Date: Tue, 15 Sep 2026 00:41:19 +0300 Subject: [PATCH 1/2] translate(reference): API React DOM index Traduce la pagina indice react-dom, incluse le API rimosse in React 19 (findDOMNode, hydrate, render, unmountComponentAtNode, renderToNodeStream, renderToStaticNodeStream). Signed-off-by: Alessandro De Blasis Co-authored-by: Cursor --- src/content/reference/react-dom/index.md | 67 +++++++++++++----------- src/sidebarReference.json | 34 ++++++------ 2 files changed, 54 insertions(+), 47 deletions(-) diff --git a/src/content/reference/react-dom/index.md b/src/content/reference/react-dom/index.md index daf829017..b5a2cb9e3 100644 --- a/src/content/reference/react-dom/index.md +++ b/src/content/reference/react-dom/index.md @@ -1,59 +1,66 @@ --- -title: React DOM APIs +title: API React DOM +translationStatus: ai-draft --- + + +Questa pagina รจ stata tradotta automaticamente e supervisionata da un maintainer. Un'ulteriore revisione da parte della community sarebbe comunque utile. [Migliora questa traduzione](https://github.com/reactjs/it.react.dev/edit/main/src/content/reference/react-dom/index.md). + + + -The `react-dom` package contains methods that are only supported for the web applications (which run in the browser DOM environment). They are not supported for React Native. +Il pacchetto `react-dom` contiene metodi supportati solo nelle applicazioni web (che vengono eseguite nell'ambiente DOM del browser). Non sono supportati in React Native. --- -## APIs {/*apis*/} +## API {/*apis*/} -These APIs can be imported from your components. They are rarely used: +Queste API possono essere importate dai tuoi componenti. Vengono usate raramente: -* [`createPortal`](/reference/react-dom/createPortal) lets you render child components in a different part of the DOM tree. -* [`flushSync`](/reference/react-dom/flushSync) lets you force React to flush a state update and update the DOM synchronously. +* [`createPortal`](/reference/react-dom/createPortal) ti permette di renderizzare componenti figli in una parte diversa dell'albero DOM. +* [`flushSync`](/reference/react-dom/flushSync) ti permette di forzare React a eseguire il flush di un aggiornamento di state e ad aggiornare il DOM in modo sincrono. -## Resource Preloading APIs {/*resource-preloading-apis*/} +## API di precaricamento delle risorse {/*resource-preloading-apis*/} -These APIs can be used to make apps faster by pre-loading resources such as scripts, stylesheets, and fonts as soon as you know you need them, for example before navigating to another page where the resources will be used. +Queste API possono essere usate per accelerare le app precaricando risorse come script, fogli di stile e font non appena sai di averne bisogno, ad esempio prima di navigare verso un'altra pagina in cui verranno usate. -[React-based frameworks](/learn/creating-a-react-app) frequently handle resource loading for you, so you might not have to call these APIs yourself. Consult your framework's documentation for details. +I [framework basati su React](/learn/creating-a-react-app) gestiscono spesso il caricamento delle risorse per te, quindi potresti non dover chiamare queste API personalmente. Consulta la documentazione del tuo framework per i dettagli. -* [`prefetchDNS`](/reference/react-dom/prefetchDNS) lets you prefetch the IP address of a DNS domain name that you expect to connect to. -* [`preconnect`](/reference/react-dom/preconnect) lets you connect to a server you expect to request resources from, even if you don't know what resources you'll need yet. -* [`preload`](/reference/react-dom/preload) lets you fetch a stylesheet, font, image, or external script that you expect to use. -* [`preloadModule`](/reference/react-dom/preloadModule) lets you fetch an ESM module that you expect to use. -* [`preinit`](/reference/react-dom/preinit) lets you fetch and evaluate an external script or fetch and insert a stylesheet. -* [`preinitModule`](/reference/react-dom/preinitModule) lets you fetch and evaluate an ESM module. +* [`prefetchDNS`](/reference/react-dom/prefetchDNS) ti permette di precaricare l'indirizzo IP di un nome di dominio DNS a cui ti aspetti di connetterti. +* [`preconnect`](/reference/react-dom/preconnect) ti permette di connetterti a un server da cui ti aspetti di richiedere risorse, anche se non sai ancora quali risorse ti serviranno. +* [`preload`](/reference/react-dom/preload) ti permette di recuperare un foglio di stile, un font, un'immagine o uno script esterno che ti aspetti di usare. +* [`preloadModule`](/reference/react-dom/preloadModule) ti permette di recuperare un modulo ESM che ti aspetti di usare. +* [`preinit`](/reference/react-dom/preinit) ti permette di recuperare ed eseguire uno script esterno o di recuperare e inserire un foglio di stile. +* [`preinitModule`](/reference/react-dom/preinitModule) ti permette di recuperare ed eseguire un modulo ESM. -## Server Rendering APIs {/*server-rendering-apis*/} +## API di renderizzazione sul server {/*server-rendering-apis*/} -This API controls how components render on the server: +Queste API controllano come i componenti vengono renderizzati sul server: -* [`browser`](/reference/react-dom/browser) lets you mark a component as browser-only during server rendering. +* [`browser`](/reference/react-dom/browser) ti permette di contrassegnare un componente come solo per il browser durante la renderizzazione sul server. --- -## Entry points {/*entry-points*/} +## Punti di ingresso {/*entry-points*/} -The `react-dom` package provides two additional entry points: +Il pacchetto `react-dom` fornisce due punti di ingresso aggiuntivi: -* [`react-dom/client`](/reference/react-dom/client) contains APIs to render React components on the client (in the browser). -* [`react-dom/server`](/reference/react-dom/server) contains APIs to render React components on the server. +* [`react-dom/client`](/reference/react-dom/client) contiene API per renderizzare componenti React sul client (nel browser). +* [`react-dom/server`](/reference/react-dom/server) contiene API per renderizzare componenti React sul server. --- -## Removed APIs {/*removed-apis*/} +## API rimosse {/*removed-apis*/} -These APIs were removed in React 19: +Queste API sono state rimosse in React 19: -* [`findDOMNode`](https://18.react.dev/reference/react-dom/findDOMNode): see [alternatives](https://18.react.dev/reference/react-dom/findDOMNode#alternatives). -* [`hydrate`](https://18.react.dev/reference/react-dom/hydrate): use [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) instead. -* [`render`](https://18.react.dev/reference/react-dom/render): use [`createRoot`](/reference/react-dom/client/createRoot) instead. -* [`unmountComponentAtNode`](/reference/react-dom/unmountComponentAtNode): use [`root.unmount()`](/reference/react-dom/client/createRoot#root-unmount) instead. -* [`renderToNodeStream`](https://18.react.dev/reference/react-dom/server/renderToNodeStream): use [`react-dom/server`](/reference/react-dom/server) APIs instead. -* [`renderToStaticNodeStream`](https://18.react.dev/reference/react-dom/server/renderToStaticNodeStream): use [`react-dom/server`](/reference/react-dom/server) APIs instead. +* [`findDOMNode`](https://18.react.dev/reference/react-dom/findDOMNode): vedi [alternative](https://18.react.dev/reference/react-dom/findDOMNode#alternatives). +* [`hydrate`](https://18.react.dev/reference/react-dom/hydrate): usa [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) invece. +* [`render`](https://18.react.dev/reference/react-dom/render): usa [`createRoot`](/reference/react-dom/client/createRoot) invece. +* [`unmountComponentAtNode`](/reference/react-dom/unmountComponentAtNode): usa [`root.unmount()`](/reference/react-dom/client/createRoot#root-unmount) invece. +* [`renderToNodeStream`](https://18.react.dev/reference/react-dom/server/renderToNodeStream): usa le API di [`react-dom/server`](/reference/react-dom/server) invece. +* [`renderToStaticNodeStream`](https://18.react.dev/reference/react-dom/server/renderToStaticNodeStream): usa le API di [`react-dom/server`](/reference/react-dom/server) invece. diff --git a/src/sidebarReference.json b/src/sidebarReference.json index 11bd96a0a..2d5c87981 100644 --- a/src/sidebarReference.json +++ b/src/sidebarReference.json @@ -1,5 +1,5 @@ { - "title": "Riferimento API", + "title": "API Reference", "path": "/reference/react", "routes": [ { @@ -7,11 +7,11 @@ "sectionHeader": "react@{{version}}" }, { - "title": "Panoramica della documentazione di React", + "title": "Overview", "path": "/reference/react" }, { - "title": "Built-in React Hooks", + "title": "Hooks", "path": "/reference/react/hooks", "routes": [ { @@ -89,7 +89,7 @@ ] }, { - "title": "Built-in React Components", + "title": "Components", "path": "/reference/react/components", "routes": [ { @@ -119,7 +119,7 @@ ] }, { - "title": "Built-in React APIs", + "title": "APIs", "path": "/reference/react/apis", "routes": [ { @@ -179,7 +179,7 @@ "sectionHeader": "react-dom@{{version}}" }, { - "title": "Built-in React DOM Hooks", + "title": "Hooks", "path": "/reference/react-dom/hooks", "routes": [ { @@ -189,7 +189,7 @@ ] }, { - "title": "React DOM Components", + "title": "Components", "path": "/reference/react-dom/components", "routes": [ { @@ -243,7 +243,7 @@ ] }, { - "title": "React DOM APIs", + "title": "API React DOM", "path": "/reference/react-dom", "routes": [ { @@ -285,7 +285,7 @@ ] }, { - "title": "Client React DOM APIs", + "title": "Client APIs", "path": "/reference/react-dom/client", "routes": [ { @@ -299,7 +299,7 @@ ] }, { - "title": "Server React DOM APIs", + "title": "Server APIs", "path": "/reference/react-dom/server", "routes": [ { @@ -329,7 +329,7 @@ ] }, { - "title": "Static React DOM APIs", + "title": "Static APIs", "path": "/reference/react-dom/static", "routes": [ { @@ -385,11 +385,11 @@ "path": "/reference/react-compiler/directives", "routes": [ { - "title": "use memo", + "title": "\"use memo\"", "path": "/reference/react-compiler/directives/use-memo" }, { - "title": "use no memo", + "title": "\"use no memo\"", "path": "/reference/react-compiler/directives/use-no-memo" } ] @@ -411,7 +411,7 @@ "sectionHeader": "eslint-plugin-react-hooks" }, { - "title": "eslint-plugin-react-hooks", + "title": "Lints", "path": "/reference/eslint-plugin-react-hooks", "routes": [ { @@ -486,10 +486,10 @@ }, { "hasSectionHeader": true, - "sectionHeader": "Regole di React" + "sectionHeader": "Rules of React" }, { - "title": "Rules of React", + "title": "Overview", "path": "/reference/rules", "routes": [ { @@ -534,7 +534,7 @@ }, { "hasSectionHeader": true, - "sectionHeader": "API Legacy" + "sectionHeader": "Legacy APIs" }, { "title": "Legacy React APIs", From f2d079a5ef3394df8ab7dac0353fc445a956d271 Mon Sep 17 00:00:00 2001 From: Alessandro De Blasis Date: Tue, 15 Sep 2026 08:29:55 +0300 Subject: [PATCH 2/2] fix(docs): ripristina sidebar e allinea terminologia react-dom index Ripristina i titoli sidebar italiani/inglesi esistenti che erano stati sovrascritti con titoli upstream; mantiene solo API React DOM per /reference/react-dom. Allinea flushSync a svuotare e usa singolare per la sezione server rendering. Signed-off-by: Alessandro De Blasis Co-authored-by: Cursor --- src/content/reference/react-dom/index.md | 4 +-- src/sidebarReference.json | 32 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/content/reference/react-dom/index.md b/src/content/reference/react-dom/index.md index b5a2cb9e3..8c0dc8a4a 100644 --- a/src/content/reference/react-dom/index.md +++ b/src/content/reference/react-dom/index.md @@ -22,7 +22,7 @@ Il pacchetto `react-dom` contiene metodi supportati solo nelle applicazioni web Queste API possono essere importate dai tuoi componenti. Vengono usate raramente: * [`createPortal`](/reference/react-dom/createPortal) ti permette di renderizzare componenti figli in una parte diversa dell'albero DOM. -* [`flushSync`](/reference/react-dom/flushSync) ti permette di forzare React a eseguire il flush di un aggiornamento di state e ad aggiornare il DOM in modo sincrono. +* [`flushSync`](/reference/react-dom/flushSync) ti permette di forzare React a svuotare in modo sincrono un aggiornamento di state e ad aggiornare il DOM. ## API di precaricamento delle risorse {/*resource-preloading-apis*/} @@ -39,7 +39,7 @@ I [framework basati su React](/learn/creating-a-react-app) gestiscono spesso il ## API di renderizzazione sul server {/*server-rendering-apis*/} -Queste API controllano come i componenti vengono renderizzati sul server: +Questa API controlla come i componenti vengono renderizzati sul server: * [`browser`](/reference/react-dom/browser) ti permette di contrassegnare un componente come solo per il browser durante la renderizzazione sul server. diff --git a/src/sidebarReference.json b/src/sidebarReference.json index 2d5c87981..0a352dd88 100644 --- a/src/sidebarReference.json +++ b/src/sidebarReference.json @@ -1,5 +1,5 @@ { - "title": "API Reference", + "title": "Riferimento API", "path": "/reference/react", "routes": [ { @@ -7,11 +7,11 @@ "sectionHeader": "react@{{version}}" }, { - "title": "Overview", + "title": "Panoramica della documentazione di React", "path": "/reference/react" }, { - "title": "Hooks", + "title": "Built-in React Hooks", "path": "/reference/react/hooks", "routes": [ { @@ -89,7 +89,7 @@ ] }, { - "title": "Components", + "title": "Built-in React Components", "path": "/reference/react/components", "routes": [ { @@ -119,7 +119,7 @@ ] }, { - "title": "APIs", + "title": "Built-in React APIs", "path": "/reference/react/apis", "routes": [ { @@ -179,7 +179,7 @@ "sectionHeader": "react-dom@{{version}}" }, { - "title": "Hooks", + "title": "Built-in React DOM Hooks", "path": "/reference/react-dom/hooks", "routes": [ { @@ -189,7 +189,7 @@ ] }, { - "title": "Components", + "title": "React DOM Components", "path": "/reference/react-dom/components", "routes": [ { @@ -285,7 +285,7 @@ ] }, { - "title": "Client APIs", + "title": "Client React DOM APIs", "path": "/reference/react-dom/client", "routes": [ { @@ -299,7 +299,7 @@ ] }, { - "title": "Server APIs", + "title": "Server React DOM APIs", "path": "/reference/react-dom/server", "routes": [ { @@ -329,7 +329,7 @@ ] }, { - "title": "Static APIs", + "title": "Static React DOM APIs", "path": "/reference/react-dom/static", "routes": [ { @@ -385,11 +385,11 @@ "path": "/reference/react-compiler/directives", "routes": [ { - "title": "\"use memo\"", + "title": "use memo", "path": "/reference/react-compiler/directives/use-memo" }, { - "title": "\"use no memo\"", + "title": "use no memo", "path": "/reference/react-compiler/directives/use-no-memo" } ] @@ -411,7 +411,7 @@ "sectionHeader": "eslint-plugin-react-hooks" }, { - "title": "Lints", + "title": "eslint-plugin-react-hooks", "path": "/reference/eslint-plugin-react-hooks", "routes": [ { @@ -486,10 +486,10 @@ }, { "hasSectionHeader": true, - "sectionHeader": "Rules of React" + "sectionHeader": "Regole di React" }, { - "title": "Overview", + "title": "Rules of React", "path": "/reference/rules", "routes": [ { @@ -534,7 +534,7 @@ }, { "hasSectionHeader": true, - "sectionHeader": "Legacy APIs" + "sectionHeader": "API Legacy" }, { "title": "Legacy React APIs",