hook-call.ts — react Source File
Architecture documentation for hook-call.ts, a typescript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c8330fef_7ce1_0981_2f41_5da0436e5f9e["hook-call.ts"] 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] c8330fef_7ce1_0981_2f41_5da0436e5f9e --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style c8330fef_7ce1_0981_2f41_5da0436e5f9e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import {createHookWrapper, useIdentity} from 'shared-runtime';
/**
* Assume that functions passed hook arguments are invoked and that their
* property loads are hoistable.
*/
function useMakeCallback({
obj,
setState,
}: {
obj: {value: number};
setState: (newState: number) => void;
}) {
const cb = useIdentity(() => setState(obj.value));
return cb;
}
const setState = (arg: number) => {
'use no memo';
return arg;
};
export const FIXTURE_ENTRYPOINT = {
fn: createHookWrapper(useMakeCallback),
params: [{obj: {value: 1}, setState}],
sequentialRenders: [
{obj: {value: 1}, setState},
{obj: {value: 2}, setState},
],
};
Domain
Subdomains
Functions
Dependencies
- shared-runtime
Source
Frequently Asked Questions
What does hook-call.ts do?
hook-call.ts is a source file in the react codebase, written in typescript. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in hook-call.ts?
hook-call.ts defines 2 function(s): setState, useMakeCallback.
What does hook-call.ts depend on?
hook-call.ts imports 1 module(s): shared-runtime.
Where is hook-call.ts in the architecture?
hook-call.ts is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/inner-function/nullable-objects/assume-invoked/hook-call.ts (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/inner-function/nullable-objects/assume-invoked).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free