Home / File/ derived-state-from-ref-and-state-no-error.js — react Source File

derived-state-from-ref-and-state-no-error.js — react Source File

Architecture documentation for derived-state-from-ref-and-state-no-error.js, a javascript file in the react codebase. 1 imports, 0 dependents.

File javascript TestingUtilities Fixtures 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  ba518ec8_2213_80c1_4090_5c20b88079f5["derived-state-from-ref-and-state-no-error.js"]
  ac587885_e294_a1e9_b13f_5e7b920fdb42["react"]
  ba518ec8_2213_80c1_4090_5c20b88079f5 --> ac587885_e294_a1e9_b13f_5e7b920fdb42
  style ba518ec8_2213_80c1_4090_5c20b88079f5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// @validateNoDerivedComputationsInEffects_exp @loggerTestOnly @outputMode:"lint"
import {useEffect, useState, useRef} from 'react';

export default function Component({test}) {
  const [local, setLocal] = useState('');

  const myRef = useRef(null);

  useEffect(() => {
    setLocal(myRef.current + test);
  }, [test]);

  return <>{local}</>;
}

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

Subdomains

Functions

Dependencies

  • react

Frequently Asked Questions

What does derived-state-from-ref-and-state-no-error.js do?
derived-state-from-ref-and-state-no-error.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 derived-state-from-ref-and-state-no-error.js?
derived-state-from-ref-and-state-no-error.js defines 1 function(s): Component.
What does derived-state-from-ref-and-state-no-error.js depend on?
derived-state-from-ref-and-state-no-error.js imports 1 module(s): react.
Where is derived-state-from-ref-and-state-no-error.js in the architecture?
derived-state-from-ref-and-state-no-error.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/effect-derived-computations/derived-state-from-ref-and-state-no-error.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/effect-derived-computations).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free