error.capture-ref-for-mutation.tsx — react Source File
Architecture documentation for error.capture-ref-for-mutation.tsx, a tsx file in the react codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR de0ba1c7_0094_00e5_5d6e_855bdcbc8e00["error.capture-ref-for-mutation.tsx"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] de0ba1c7_0094_00e5_5d6e_855bdcbc8e00 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] de0ba1c7_0094_00e5_5d6e_855bdcbc8e00 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style de0ba1c7_0094_00e5_5d6e_855bdcbc8e00 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import {useRef} from 'react';
import {addOne} from 'shared-runtime';
function useKeyCommand() {
const currentPosition = useRef(0);
const handleKey = direction => () => {
const position = currentPosition.current;
const nextPosition = direction === 'left' ? addOne(position) : position;
currentPosition.current = nextPosition;
};
const moveLeft = {
handler: handleKey('left')(),
};
const moveRight = {
handler: handleKey('right')(),
};
return [moveLeft, moveRight];
}
export const FIXTURE_ENTRYPOINT = {
fn: useKeyCommand,
params: [],
};
Domain
Subdomains
Functions
Dependencies
- react
- shared-runtime
Source
Frequently Asked Questions
What does error.capture-ref-for-mutation.tsx do?
error.capture-ref-for-mutation.tsx is a source file in the react codebase, written in tsx. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in error.capture-ref-for-mutation.tsx?
error.capture-ref-for-mutation.tsx defines 1 function(s): useKeyCommand.
What does error.capture-ref-for-mutation.tsx depend on?
error.capture-ref-for-mutation.tsx imports 2 module(s): react, shared-runtime.
Where is error.capture-ref-for-mutation.tsx in the architecture?
error.capture-ref-for-mutation.tsx is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.capture-ref-for-mutation.tsx (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