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
+
Renderiza um elemento React para o seu HTML inicial. O React retornará uma string HTML. Você pode usar este método para gerar HTML no servidor e enviar o markup no request inicial para ter carregamentos de páginas mais rápidos e para permitir que motores de pesquisa rastreiem suas páginas para fins de SEO.
41
41
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.
42
+
Se você invocar[`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate)em um nó que já tem o seu markup processado pelo servidor, o React vai preservá-lo e apenas atribuir manipuladores de eventos, permitindo que você tenha uma experiência de primeiro carregamento muito eficiente.
43
43
44
44
* * *
45
45
@@ -49,9 +49,9 @@ If you call [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate) on a node that
49
49
ReactDOMServer.renderToStaticMarkup(element)
50
50
```
51
51
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.
52
+
Semelhante a[`renderToString`](#rendertostring), exceto que este não cria atributos DOM extras que o React usa internamente, como `data-reactroot`. Isso é útil se você quiser usar o React como um simples gerador de páginas estáticas, já que remover os atributos extras pode economizar alguns bytes.
53
53
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.
54
+
Se você planeja usar o React no cliente para tornar o markup interativo, não use este método. Em vez disso, use [`renderToString`](#rendertostring)no servidor e [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate)no cliente.
55
55
56
56
* * *
57
57
@@ -61,15 +61,15 @@ If you plan to use React on the client to make the markup interactive, do not us
61
61
ReactDOMServer.renderToNodeStream(element)
62
62
```
63
63
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.
64
+
Renderiza um elemento React para seu HTML inicial. Retorna um [Stream legível](https://nodejs.org/api/stream.html#stream_readable_streams)que gera uma stringHTML. A saída HTML desse stream é exatamente igual ao que[`ReactDOMServer.renderToString`](#rendertostring)retornaria. Você pode usar este método para gerar HTML no servidor e enviar o markup no request inicial para ter carregamentos de página mais rápidos e para permitir que motores de pesquisa rastreiem suas páginas para fins de SEO.
65
65
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.
66
+
Se você invocar[`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate)em um nó que já tem o seu markup processado pelo servidor, React vai preservá-lo e apenas atribuir manipuladores de eventos, permitindo que você tenha uma experiência de primeiro carregamento muito eficiente.
67
67
68
-
> Note:
68
+
> Nota:
69
69
>
70
-
> Server-only. This API is not available in the browser.
70
+
> Apenas para servidor. Esta API não está disponível no navegador.
71
71
>
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.
72
+
> O stream retornado deste método retornará um stream de bytes codificado em utf-8. Se você precisar de um stream em outra codificação, dê uma olhada em um projeto como o [iconv-lite](https://www.npmjs.com/package/iconv-lite), que fornece streams de transformação para transcodificação de texto.
73
73
74
74
* * *
75
75
@@ -79,14 +79,14 @@ If you call [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate) on a node that
79
79
ReactDOMServer.renderToStaticNodeStream(element)
80
80
```
81
81
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.
82
+
Semelhante a[`renderToNodeStream`](#rendertonodestream), exceto que este não cria atributos DOM extras que o React usa internamente, como `data-reactroot`. Isso é útil se você quiser usar o React como um simples gerador de páginas estáticas, já que remover os atributos extras pode economizar alguns bytes.
83
83
84
-
The HTML output by this stream is exactly equal to what[`ReactDOMServer.renderToStaticMarkup`](#rendertostaticmarkup)would return.
84
+
A saída HTML desse stream é exatamente igual ao que[`ReactDOMServer.renderToStaticMarkup`](#rendertostaticmarkup)retornaria.
85
85
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.
86
+
Se você planeja usar o React no cliente para tornar o markup interativo, não use este método. Em vez disso, use [`renderToNodeStream`](#rendertonodestream)no servidor e [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate)no cliente.
87
87
88
-
> Note:
88
+
> Nota:
89
89
>
90
-
> Server-only. This API is not available in the browser.
90
+
> Apenas para servidor. Esta API não está disponível no navegador.
91
91
>
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.
92
+
> O stream retornado deste método retornará um stream de bytes codificado em utf-8. Se você precisar de um stream em outra codificação, dê uma olhada em um projeto como o [iconv-lite](https://www.npmjs.com/package/iconv-lite), que fornece streams de transformação para transcodificação de texto.
0 commit comments