Home / File/ allow-mutating-ref-property-in-callback-passed-to-jsx-indirect.tsx — react Source File

allow-mutating-ref-property-in-callback-passed-to-jsx-indirect.tsx — react Source File

Architecture documentation for allow-mutating-ref-property-in-callback-passed-to-jsx-indirect.tsx, a tsx file in the react codebase. 1 imports, 0 dependents.

File tsx TestingUtilities Fixtures 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  7befbecc_eb99_097b_a679_4dab66d926e3["allow-mutating-ref-property-in-callback-passed-to-jsx-indirect.tsx"]
  ac587885_e294_a1e9_b13f_5e7b920fdb42["react"]
  7befbecc_eb99_097b_a679_4dab66d926e3 --> ac587885_e294_a1e9_b13f_5e7b920fdb42
  style 7befbecc_eb99_097b_a679_4dab66d926e3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// @validateRefAccessDuringRender
import {useRef} from 'react';

function Component() {
  const ref = useRef(null);

  const setRef = () => {
    if (ref.current !== null) {
      ref.current.value = '';
    }
  };

  const onClick = () => {
    setRef();
  };

  return (
    <>
      <input ref={ref} />
      <button onClick={onClick} />
    </>
  );
}

export const FIXTURE_ENTRYPOINT = {
  fn: Component,
  params: [{}],
};

Subdomains

Functions

Dependencies

  • react

Frequently Asked Questions

What does allow-mutating-ref-property-in-callback-passed-to-jsx-indirect.tsx do?
allow-mutating-ref-property-in-callback-passed-to-jsx-indirect.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 allow-mutating-ref-property-in-callback-passed-to-jsx-indirect.tsx?
allow-mutating-ref-property-in-callback-passed-to-jsx-indirect.tsx defines 1 function(s): Component.
What does allow-mutating-ref-property-in-callback-passed-to-jsx-indirect.tsx depend on?
allow-mutating-ref-property-in-callback-passed-to-jsx-indirect.tsx imports 1 module(s): react.
Where is allow-mutating-ref-property-in-callback-passed-to-jsx-indirect.tsx in the architecture?
allow-mutating-ref-property-in-callback-passed-to-jsx-indirect.tsx is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-mutating-ref-property-in-callback-passed-to-jsx-indirect.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