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 8952f1d
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Tradução de compilationMode.md para Português (Brasil) (#1161)
* docs: translate `compilationMode.md` to Português (Brasil)
* docs: translate `compilationMode.md` to Português (Brasil)
* chore: rename title back to original `compilationMode`
* chore: minor pt-br styleguide issues fixes
per @jhonmike feedback
---------
Co-authored-by: translate-react-bot[bot] <251169733+translate-react-bot[bot]@users.noreply.github.com>
Co-authored-by: Jhon Mike <jhon.msdev@gmail.com>
Controls the strategy for determining which functions the React Compiler will optimize.
24
+
Controla a estratégia para determinar quais funções o React Compiler otimizará.
26
25
27
-
#### Type {/*type*/}
26
+
#### Tipo {/*type*/}
28
27
29
28
```
30
29
'infer' | 'syntax' | 'annotation' | 'all'
31
30
```
32
31
33
-
#### Default value {/*default-value*/}
32
+
#### Valor padrão {/*default-value*/}
34
33
35
34
`'infer'`
36
35
37
-
#### Options {/*options*/}
36
+
#### Opções {/*options*/}
38
37
39
-
-**`'infer'`** (default): The compiler uses intelligent heuristics to identify React components and hooks:
40
-
-Functions explicitly annotated with `"use memo"` directive
41
-
-Functions that are named like components (PascalCase) or hooks (`use`prefix) AND create JSX and/or call other hooks
38
+
-**`'infer'`** (padrão): O compilador usa heurísticas inteligentes para identificar componentes e hooks React:
39
+
-Funções explicitamente anotadas com a diretiva `"use memo"`
40
+
-Funções que têm nomes como componentes (PascalCase) ou hooks (`use`prefixo) E criam JSX e/ou chamam outros hooks
42
41
43
-
-**`'annotation'`**: Only compile functions explicitly marked with the `"use memo"` directive. Ideal for incremental adoption.
42
+
-**`'annotation'`**: Compila apenas funções explicitamente marcadas com a diretiva `"use memo"`. Ideal para adoção incremental.
44
43
45
-
-**`'syntax'`**: Only compile components and hooks that use Flow's [component](https://flow.org/en/docs/react/component-syntax/)and[hook](https://flow.org/en/docs/react/hook-syntax/)syntax.
44
+
-**`'syntax'`**: Compila apenas componentes e hooks que usam a sintaxe de [componente](https://flow.org/en/docs/react/component-syntax/)e[hook](https://flow.org/en/docs/react/hook-syntax/)do Flow.
46
45
47
-
-**`'all'`**: Compile all top-level functions. Not recommended as it may compile non-React functions.
46
+
-**`'all'`**: Compila todas as funções de nível superior. Não recomendado, pois pode compilar funções não-React.
48
47
49
-
#### Caveats {/*caveats*/}
48
+
#### Ressalvas {/*caveats*/}
50
49
51
-
-The `'infer'`mode requires functions to follow React naming conventions to be detected
52
-
-Using `'all'`mode may negatively impact performance by compiling utility functions
53
-
-The `'syntax'`mode requires Flow and won't work with TypeScript
54
-
-Regardless of mode, functions with `"use no memo"`directive are always skipped
50
+
-O modo `'infer'`exige que as funções sigam as convenções de nomenclatura do React para serem detectadas
51
+
-Usar o modo `'all'`pode impactar negativamente o desempenho ao compilar funções utilitárias
52
+
-O modo `'syntax'`requer Flow e não funcionará com TypeScript
53
+
-Independentemente do modo, funções com a diretiva `"use no memo"`são sempre ignoradas
0 commit comments