You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Render a React element to its initial HTML. React will return an HTML string. You can use this method to generate HTML on the server and send the markup down on the initial request for faster page loads and to allow search engines to crawl your pages for SEO purposes.
40
+
Renderizza un elemento React nel suo HTML iniziale. React ritornerà una stringa HTML. Puoi usare questo metodo per generare HTML sul server e inviare il markup nella richiesta iniziale per rendere più veloce il caricamento della pagina e consentire ai motori di ricerca di indicizzare le tue pagine per scopi di SEO.
41
+
42
+
Se invochi [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate) su un nodo che già possiede questo markup renderizzato lato server, React lo preserverà e aggancierà solamente i gestori degli eventi, consentendoti di avere un caricamento iniziale molto performante.
41
43
42
-
If you call [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate) on a node that already has this server-rendered markup, React will preserve it and only attach event handlers, allowing you to have a very performant first-load experience.
43
44
44
45
* * *
45
46
@@ -49,9 +50,9 @@ If you call [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate) on a node that
49
50
ReactDOMServer.renderToStaticMarkup(element)
50
51
```
51
52
52
-
Similar to[`renderToString`](#rendertostring), except this doesn't create extra DOM attributes that React uses internally, such as `data-reactroot`. This is useful if you want to use React as a simple static page generator, as stripping away the extra attributes can save some bytes.
53
+
Simile a[`renderToString`](#rendertostring), tranne per il fatto che non crea attributi DOM aggiuntivi che React usa internamente, come `data-reactroot`. Questo metodo è utile se vuoi usare React come un semplice generatore di pagine statiche, in quanto sbarazzarsi di attributi aggiuntivi può farti risparmiare dei bytes.
53
54
54
-
If you plan to use React on the client to make the markup interactive, do not use this method. Instead, use[`renderToString`](#rendertostring)on the server and[`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate)on the client.
55
+
Se hai intenzione di usare React sul client per creare un markup interattivo, non usare questo metodo. Utilizza, invece,[`renderToString`](#rendertostring)sul server e[`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate)sul client.
55
56
56
57
* * *
57
58
@@ -61,15 +62,15 @@ If you plan to use React on the client to make the markup interactive, do not us
61
62
ReactDOMServer.renderToNodeStream(element)
62
63
```
63
64
64
-
Render a React element to its initial HTML. Returns a [Readable stream](https://nodejs.org/api/stream.html#stream_readable_streams)that outputs an HTML string. The HTML output by this stream is exactly equal to what [`ReactDOMServer.renderToString`](#rendertostring) would return. You can use this method to generate HTML on the server and send the markup down on the initial request for faster page loads and to allow search engines to crawl your pages for SEO purposes.
65
+
Renderizza un elemento React nel suo HTML iniziale. Ritorna uno [stream Readable](https://nodejs.org/api/stream.html#stream_readable_streams)che produce una stringa HTML. Lo HTML prodotto da questo stream è esattamente identico a quello che ritornerebbe [`ReactDOMServer.renderToString`](#rendertostring). Puoi usare questo metodo per generare HTML sul server e inviare il markup nella richiesta iniziale per rendere più veloce il caricamento della pagina e consentire ai motori di ricerca di indicizzare le tue pagine per scopi di SEO.
65
66
66
-
If you call [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate)on a node that already has this server-rendered markup, React will preserve it and only attach event handlers, allowing you to have a very performant first-load experience.
67
+
Se invochi [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate)su un nodo che già possiede questo markup renderizzato lato server, React lo preserverà e aggancierà solamente i gestori degli eventi, consentendoti di avere un caricamento iniziale molto performante.
67
68
68
-
> Note:
69
+
> Nota:
69
70
>
70
-
> Server-only. This API is not available in the browser.
71
+
> Solo server. Questa API non è disponibile nel browser.
71
72
>
72
-
> The stream returned from this method will return a byte stream encoded in utf-8. If you need a stream in another encoding, take a look at a project like [iconv-lite](https://www.npmjs.com/package/iconv-lite), which provides transform streams for transcoding text.
73
+
> Lo stream ritornato da questo metodo sarà uno stream di bytes codificato in utf-8. Se hai bisogno di uno stream in un'altra codifica, da uno sguardo a un progetto tipo [iconv-lite](https://www.npmjs.com/package/iconv-lite), il quale fornisce stream di trasformazione per la transcodifica del testo.
73
74
74
75
* * *
75
76
@@ -79,14 +80,14 @@ If you call [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate) on a node that
79
80
ReactDOMServer.renderToStaticNodeStream(element)
80
81
```
81
82
82
-
Similar to[`renderToNodeStream`](#rendertonodestream), except this doesn't create extra DOM attributes that React uses internally, such as `data-reactroot`. This is useful if you want to use React as a simple static page generator, as stripping away the extra attributes can save some bytes.
83
+
Simile a[`renderToNodeStream`](#rendertonodestream), tranne per il fatto che non crea attributi DOM aggiuntivi che React usa internamente, come `data-reactroot`. Questo metodo è utile se vuoi usare React come un semplice generatore di pagine statiche, in quanto sbarazzarsi di attributi aggiuntivi può farti risparmiare dei bytes.
83
84
84
-
The HTML output by this stream is exactly equal to what [`ReactDOMServer.renderToStaticMarkup`](#rendertostaticmarkup) would return.
85
+
Lo HTML prodotto da questo stream è esattamente identico a quello che ritornerebbe [`ReactDOMServer.renderToStaticMarkup`](#rendertostaticmarkup).
85
86
86
-
If you plan to use React on the client to make the markup interactive, do not use this method. Instead, use[`renderToNodeStream`](#rendertonodestream) on the server and[`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate)on the client.
87
+
Se hai intenzione di usare React sul client per creare un markup interattivo, non usare questo metodo. Utilizza, invece,[`renderToString`](#rendertostring) sul server e[`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate)sul client.
87
88
88
-
> Note:
89
+
> Nota:
89
90
>
90
-
> Server-only. This API is not available in the browser.
91
+
> Solo server. Questa API non è disponibile nel browser.
91
92
>
92
-
> The stream returned from this method will return a byte stream encoded in utf-8. If you need a stream in another encoding, take a look at a project like [iconv-lite](https://www.npmjs.com/package/iconv-lite), which provides transform streams for transcoding text.
93
+
> Lo stream ritornato da questo metodo sarà uno stream di bytes codificato in utf-8. Se hai bisogno di uno stream in un'altra codifica, da uno sguardo a un progetto tipo [iconv-lite](https://www.npmjs.com/package/iconv-lite), il quale fornisce stream di trasformazione per la transcodifica del testo.
0 commit comments