name-anonymous-functions.js — react Source File
Architecture documentation for name-anonymous-functions.js, a javascript file in the react codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR b1ac8c15_ff17_3b37_c552_77ce94c07a52["name-anonymous-functions.js"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] b1ac8c15_ff17_3b37_c552_77ce94c07a52 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] b1ac8c15_ff17_3b37_c552_77ce94c07a52 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style b1ac8c15_ff17_3b37_c552_77ce94c07a52 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// @enableNameAnonymousFunctions
import {useCallback, useEffect} from 'react';
import {identity, Stringify, useIdentity} from 'shared-runtime';
import * as SharedRuntime from 'shared-runtime';
function Component(props) {
function named() {
const inner = () => props.named;
const innerIdentity = identity(() => props.named);
return inner(innerIdentity());
}
const callback = useCallback(() => {
return 'ok';
}, []);
const namedVariable = function () {
return props.namedVariable;
};
const methodCall = SharedRuntime.identity(() => props.methodCall);
const call = identity(() => props.call);
const builtinElementAttr = <div onClick={() => props.builtinElementAttr} />;
const namedElementAttr = <Stringify onClick={() => props.namedElementAttr} />;
const hookArgument = useIdentity(() => props.hookArgument);
useEffect(() => {
console.log(props.useEffect);
JSON.stringify(null, null, () => props.useEffect);
const g = () => props.useEffect;
console.log(g());
}, [props.useEffect]);
return (
<>
{named()}
{callback()}
{namedVariable()}
{methodCall()}
{call()}
{builtinElementAttr}
{namedElementAttr}
{hookArgument()}
</>
);
}
export const TODO_FIXTURE_ENTRYPOINT = {
fn: Component,
params: [
{
named: '<named>',
namedVariable: '<namedVariable>',
methodCall: '<methodCall>',
call: '<call>',
builtinElementAttr: '<builtinElementAttr>',
namedElementAttr: '<namedElementAttr>',
hookArgument: '<hookArgument>',
useEffect: '<useEffect>',
},
],
};
Domain
Subdomains
Functions
Dependencies
- react
- shared-runtime
Source
Frequently Asked Questions
What does name-anonymous-functions.js do?
name-anonymous-functions.js is a source file in the react codebase, written in javascript. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in name-anonymous-functions.js?
name-anonymous-functions.js defines 1 function(s): Component.
What does name-anonymous-functions.js depend on?
name-anonymous-functions.js imports 2 module(s): react, shared-runtime.
Where is name-anonymous-functions.js in the architecture?
name-anonymous-functions.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/name-anonymous-functions.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free