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
{{ message }}
Repository navigation
Commit 9061ace
Browse filesBrowse the repository at this point in the historyBrowse files
React Compiler directives are special string literals that control whether specific functions are compiled.
5
+
Diretivas do Compilador React são literais de string especiais que controlam se funções específicas são compiladas.
7
6
</Intro>
8
7
9
8
```js
10
9
functionMyComponent() {
11
-
"use memo"; //Opt this component into compilation
10
+
"use memo"; //Otimiza este componente para compilação
12
11
return<div>{/* ... */}</div>;
13
12
}
14
13
```
@@ -17,86 +16,86 @@ function MyComponent() {
17
16
18
17
---
19
18
20
-
## Overview {/*overview*/}
19
+
## Visão Geral {/*overview*/}
21
20
22
-
React Compiler directives provide fine-grained control over which functions are optimized by the compiler. They are string literals placed at the beginning of a function body or at the top of a module.
21
+
Diretivas do Compilador React fornecem controle granular sobre quais funções são otimizadas pelo compilador. Elas são literais de string colocadas no início do corpo de uma função ou no topo de um módulo.
23
22
24
-
### Available directives {/*available-directives*/}
***[`"use memo"`](/reference/react-compiler/directives/use-memo)** - Opts a function into compilation
27
-
***[`"use no memo"`](/reference/react-compiler/directives/use-no-memo)** - Opts a function out of compilation
25
+
***[`"use memo"`](/reference/react-compiler/directives/use-memo)** - Otimiza uma função para compilação
26
+
***[`"use no memo"`](/reference/react-compiler/directives/use-no-memo)** - Impede a otimização de uma função para compilação
28
27
29
-
### Quick comparison {/*quick-comparison*/}
28
+
### Comparação rápida {/*quick-comparison*/}
30
29
31
-
|Directive|Purpose|When to use|
30
+
|Diretiva|Propósito|Quando usar|
32
31
|-----------|---------|-------------|
33
-
|[`"use memo"`](/reference/react-compiler/directives/use-memo)|Force compilation|When using `annotation`mode or to override `infer` mode heuristics|
34
-
|[`"use no memo"`](/reference/react-compiler/directives/use-no-memo)|Prevent compilation|Debugging issues or working with incompatible code|
32
+
|[`"use memo"`](/reference/react-compiler/directives/use-memo)|Forçar compilação|Ao usar o modo `annotation`ou para substituir heurísticas do modo `infer`|
33
+
|[`"use no memo"`](/reference/react-compiler/directives/use-no-memo)|Prevenir compilação|Para depurar problemas ou trabalhar com código incompatível|
0 commit comments