tryFindDirectiveEnablingMemoization() — react Function Reference
Architecture documentation for the tryFindDirectiveEnablingMemoization() function in Program.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 931a40c4_9b75_45bd_9aff_f4c45e92c16d["tryFindDirectiveEnablingMemoization()"] 9aa4477d_960b_1ea1_b6d9_36076aaa70bd["Program.ts"] 931a40c4_9b75_45bd_9aff_f4c45e92c16d -->|defined in| 9aa4477d_960b_1ea1_b6d9_36076aaa70bd db0bec13_2016_3880_d2b9_adcd797cdf2c["processFn()"] db0bec13_2016_3880_d2b9_adcd797cdf2c -->|calls| 931a40c4_9b75_45bd_9aff_f4c45e92c16d 37c561cb_7b67_6332_ee68_b69aaf917134["getReactFunctionType()"] 37c561cb_7b67_6332_ee68_b69aaf917134 -->|calls| 931a40c4_9b75_45bd_9aff_f4c45e92c16d 9f0e6a52_ff9e_00f3_1760_5fddfd89b234["Ok()"] 931a40c4_9b75_45bd_9aff_f4c45e92c16d -->|calls| 9f0e6a52_ff9e_00f3_1760_5fddfd89b234 eeae9a52_a6ca_1fc5_b5ef_49075de37df1["findDirectivesDynamicGating()"] 931a40c4_9b75_45bd_9aff_f4c45e92c16d -->|calls| eeae9a52_a6ca_1fc5_b5ef_49075de37df1 9217845a_d29d_c624_b607_e3b35cf604bc["Err()"] 931a40c4_9b75_45bd_9aff_f4c45e92c16d -->|calls| 9217845a_d29d_c624_b607_e3b35cf604bc 46bdf8e6_4a50_0326_ba9a_f74ee3cfc291["isOk()"] 931a40c4_9b75_45bd_9aff_f4c45e92c16d -->|calls| 46bdf8e6_4a50_0326_ba9a_f74ee3cfc291 5228ee8c_dc7c_d859_3f41_614fd9c00374["unwrap()"] 931a40c4_9b75_45bd_9aff_f4c45e92c16d -->|calls| 5228ee8c_dc7c_d859_3f41_614fd9c00374 7dd8eefb_2237_6426_9d5d_a2c0267dc003["unwrapErr()"] 931a40c4_9b75_45bd_9aff_f4c45e92c16d -->|calls| 7dd8eefb_2237_6426_9d5d_a2c0267dc003 style 931a40c4_9b75_45bd_9aff_f4c45e92c16d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Program.ts lines 51–67
export function tryFindDirectiveEnablingMemoization(
directives: Array<t.Directive>,
opts: ParsedPluginOptions,
): Result<t.Directive | null, CompilerError> {
const optIn = directives.find(directive =>
OPT_IN_DIRECTIVES.has(directive.value.value),
);
if (optIn != null) {
return Ok(optIn);
}
const dynamicGating = findDirectivesDynamicGating(directives, opts);
if (dynamicGating.isOk()) {
return Ok(dynamicGating.unwrap()?.directive ?? null);
} else {
return Err(dynamicGating.unwrapErr());
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does tryFindDirectiveEnablingMemoization() do?
tryFindDirectiveEnablingMemoization() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Program.ts.
Where is tryFindDirectiveEnablingMemoization() defined?
tryFindDirectiveEnablingMemoization() is defined in compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Program.ts at line 51.
What does tryFindDirectiveEnablingMemoization() call?
tryFindDirectiveEnablingMemoization() calls 6 function(s): Err, Ok, findDirectivesDynamicGating, isOk, unwrap, unwrapErr.
What calls tryFindDirectiveEnablingMemoization()?
tryFindDirectiveEnablingMemoization() is called by 2 function(s): getReactFunctionType, processFn.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free