Skip to content

Commit a0debfa

Browse files
Translate renderToStaticMarkup.md to Portuguese (#1031)
1 parent 32c2d1f commit a0debfa

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

src/content/reference/react-dom/server/renderToStaticMarkup.md

+23-23
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: renderToStaticMarkup
44

55
<Intro>
66

7-
`renderToStaticMarkup` renders a non-interactive React tree to an HTML string.
7+
`renderToStaticMarkup` renderiza uma árvore React não interativa para uma string HTML.
88

99
```js
1010
const html = renderToStaticMarkup(reactNode, options?)
@@ -16,64 +16,64 @@ const html = renderToStaticMarkup(reactNode, options?)
1616
1717
---
1818
19-
## Reference {/*reference*/}
19+
## Referência {/*reference*/}
2020
2121
### `renderToStaticMarkup(reactNode, options?)` {/*rendertostaticmarkup*/}
2222
23-
On the server, call `renderToStaticMarkup` to render your app to HTML.
23+
No servidor, chame `renderToStaticMarkup` para renderizar seu aplicativo para HTML.
2424
2525
```js
2626
import { renderToStaticMarkup } from 'react-dom/server';
2727

2828
const html = renderToStaticMarkup(<Page />);
2929
```
3030
31-
It will produce non-interactive HTML output of your React components.
31+
Ele produzirá saída HTML não interativa de seus componentes React.
3232
33-
[See more examples below.](#usage)
33+
[Veja mais exemplos abaixo.](#usage)
3434
35-
#### Parameters {/*parameters*/}
35+
#### Parâmetros {/*parameters*/}
3636
37-
* `reactNode`: A React node you want to render to HTML. For example, a JSX node like `<Page />`.
38-
* **optional** `options`: An object for server render.
39-
* **optional** `identifierPrefix`: A string prefix React uses for IDs generated by [`useId`.](/reference/react/useId) Useful to avoid conflicts when using multiple roots on the same page.
37+
* `reactNode`: Um nó React que você deseja renderizar em HTML. Por exemplo, um nó JSX como `<Page />`.
38+
* **opcional** `options`: Um objeto para renderização no servidor.
39+
* **opcional** `identifierPrefix`: Um prefixo de string que o React usa para IDs gerados por [`useId`.](/reference/react/useId) Útil para evitar conflitos ao usar vários roots na mesma página.
4040
41-
#### Returns {/*returns*/}
41+
#### Retorna {/*returns*/}
4242
43-
An HTML string.
43+
Uma string HTML.
4444
45-
#### Caveats {/*caveats*/}
45+
#### Ressalvas {/*caveats*/}
4646
47-
* `renderToStaticMarkup` output cannot be hydrated.
47+
* A saída de `renderToStaticMarkup` não pode ser hidratada.
4848
49-
* `renderToStaticMarkup` has limited Suspense support. If a component suspends, `renderToStaticMarkup` immediately sends its fallback as HTML.
49+
* `renderToStaticMarkup` tem suporte limitado para Suspense. Se um componente suspender, `renderToStaticMarkup` envia imediatamente seu fallback como HTML.
5050
51-
* `renderToStaticMarkup` works in the browser, but using it in the client code is not recommended. If you need to render a component to HTML in the browser, [get the HTML by rendering it into a DOM node.](/reference/react-dom/server/renderToString#removing-rendertostring-from-the-client-code)
51+
* `renderToStaticMarkup` funciona no navegador, mas usá-lo no código do cliente não é recomendado. Se você precisar renderizar um componente para HTML no navegador, [obtenha o HTML renderizando-o em um nó DOM.](/reference/react-dom/server/renderToString#removing-rendertostring-from-the-client-code)
5252
5353
---
5454
55-
## Usage {/*usage*/}
55+
## Uso {/*usage*/}
5656
57-
### Rendering a non-interactive React tree as HTML to a string {/*rendering-a-non-interactive-react-tree-as-html-to-a-string*/}
57+
### Renderizando uma árvore React não interativa como HTML para uma string {/*rendering-a-non-interactive-react-tree-as-html-to-a-string*/}
5858
59-
Call `renderToStaticMarkup` to render your app to an HTML string which you can send with your server response:
59+
Chame `renderToStaticMarkup` para renderizar seu aplicativo em uma string HTML que você pode enviar com sua resposta do servidor:
6060
6161
```js {5-6}
6262
import { renderToStaticMarkup } from 'react-dom/server';
6363

64-
// The route handler syntax depends on your backend framework
64+
// A sintaxe do manipulador de rota depende da sua estrutura de backend
6565
app.use('/', (request, response) => {
6666
const html = renderToStaticMarkup(<Page />);
6767
response.send(html);
6868
});
6969
```
7070
71-
This will produce the initial non-interactive HTML output of your React components.
71+
Isso produzirá a saída HTML inicial não interativa de seus componentes React.
7272
7373
<Pitfall>
7474
75-
This method renders **non-interactive HTML that cannot be hydrated.** This is useful if you want to use React as a simple static page generator, or if you're rendering completely static content like emails.
75+
Este método renderiza **HTML não interativo que não pode ser hidratado.** Isso é útil se você deseja usar React como um gerador de página estática simples, ou se estiver renderizando conteúdo completamente estático, como e-mails.
7676
77-
Interactive apps should use [`renderToString`](/reference/react-dom/server/renderToString) on the server and [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) on the client.
77+
Aplicativos interativos devem usar [`renderToString`](/reference/react-dom/server/renderToString) no servidor e [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) no cliente.
7878
79-
</Pitfall>
79+
</Pitfall>

0 commit comments

Comments
 (0)