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
Controls the strategy for determining which functions the React Compiler will optimize.
25
+
Controla a estratégia para determinar quais funções o React Compiler irá otimizar.
26
26
27
-
#### Type {/*type*/}
27
+
#### Tipo {/*type*/}
28
28
29
29
```
30
30
'infer' | 'syntax' | 'annotation' | 'all'
31
31
```
32
32
33
-
#### Default value {/*default-value*/}
33
+
#### Valor padrão {/*default-value*/}
34
34
35
35
`'infer'`
36
36
37
-
#### Options {/*options*/}
37
+
#### Opções {/*options*/}
38
38
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
39
+
-**`'infer'`** (padrão): O compilador usa heurísticas inteligentes para identificar componentes e hooks do React:
40
+
-Funções explicitamente anotadas com a diretiva `"use memo"`
41
+
-Funções que são nomeadas como componentes (PascalCase) ou hooks (prefixo `use`) E criam JSX e/ou chamam outros hooks
42
42
43
-
-**`'annotation'`**: Only compile functions explicitly marked with the `"use memo"` directive. Ideal for incremental adoption.
43
+
-**`'annotation'`**: Compila apenas funções explicitamente marcadas com a diretiva `"use memo"`. Ideal para adoção incremental.
44
44
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.
45
+
-**`'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
46
47
-
-**`'all'`**: Compile all top-level functions. Not recommended as it may compile non-React functions.
47
+
-**`'all'`**: Compila todas as funções de nível superior. Não recomendado, pois pode compilar funções que não são do React.
48
48
49
-
#### Caveats {/*caveats*/}
49
+
#### Ressalvas {/*caveats*/}
50
50
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
51
+
-O modo `'infer'`requer que as funções sigam as convenções de nomenclatura do React para serem detectadas
52
+
-Usar o modo `'all'`pode impactar negativamente o desempenho ao compilar funções utilitárias
53
+
-O modo `'syntax'`requer Flow e não funcionará com TypeScript
54
+
-Independentemente do modo, as funções com a diretiva `"use no memo"`são sempre ignoradas
0 commit comments