Skip to content

Commit 088cf8c

Browse files
Manugaldeblasis
authored andcommitted
Add translation for ReactDOMServer (#125)
* Add translation for ReactDOMServer * Update content/docs/reference-react-dom-server.md Co-Authored-By: Manugal <[email protected]> * Update content/docs/reference-react-dom-server.md Co-Authored-By: Manugal <[email protected]> * Update content/docs/reference-react-dom-server.md Co-Authored-By: Manugal <[email protected]>
1 parent 0ff401b commit 088cf8c

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

content/docs/reference-react-dom-server.md

+21-20
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ category: Reference
66
permalink: docs/react-dom-server.html
77
---
88

9-
The `ReactDOMServer` object enables you to render components to static markup. Typically, it's used on a Node server:
9+
L'oggetto `ReactDOMServer` ti permette di renderizzare componenti in markup statici. Tipicamente viene usato con un server Node:
1010

1111
```js
1212
// ES modules
@@ -15,31 +15,32 @@ import ReactDOMServer from 'react-dom/server';
1515
var ReactDOMServer = require('react-dom/server');
1616
```
1717

18-
## Overview {#overview}
18+
## Panoramica {#overview}
1919

20-
The following methods can be used in both the server and browser environments:
20+
I seguenti metodi possono essere usati sia nel server che nel browser:
2121

2222
- [`renderToString()`](#rendertostring)
2323
- [`renderToStaticMarkup()`](#rendertostaticmarkup)
2424

25-
These additional methods depend on a package (`stream`) that is **only available on the server**, and won't work in the browser.
25+
Questi metodi aggiuntivi dipendono da un package (`stream`) che è **disponibile solo sul server**, mentre non funziona nel browser.
2626

2727
- [`renderToNodeStream()`](#rendertonodestream)
2828
- [`renderToStaticNodeStream()`](#rendertostaticnodestream)
2929

3030
* * *
3131

32-
## Reference {#reference}
32+
## Riferimento {#reference}
3333

3434
### `renderToString()` {#rendertostring}
3535

3636
```javascript
3737
ReactDOMServer.renderToString(element)
3838
```
3939

40-
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.
4143

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.
4344

4445
* * *
4546

@@ -49,9 +50,9 @@ If you call [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate) on a node that
4950
ReactDOMServer.renderToStaticMarkup(element)
5051
```
5152

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.
5354

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.
5556

5657
* * *
5758

@@ -61,15 +62,15 @@ If you plan to use React on the client to make the markup interactive, do not us
6162
ReactDOMServer.renderToNodeStream(element)
6263
```
6364

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.
6566

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.
6768

68-
> Note:
69+
> Nota:
6970
>
70-
> Server-only. This API is not available in the browser.
71+
> Solo server. Questa API non è disponibile nel browser.
7172
>
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.
7374
7475
* * *
7576

@@ -79,14 +80,14 @@ If you call [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate) on a node that
7980
ReactDOMServer.renderToStaticNodeStream(element)
8081
```
8182

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.
8384

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).
8586

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.
8788

88-
> Note:
89+
> Nota:
8990
>
90-
> Server-only. This API is not available in the browser.
91+
> Solo server. Questa API non è disponibile nel browser.
9192
>
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

Comments
 (0)