Home / File/ error.exhaustive-deps-effect-events.js — react Source File

error.exhaustive-deps-effect-events.js — react Source File

Architecture documentation for error.exhaustive-deps-effect-events.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
  2ebeb1c7_3e8b_b9eb_70f2_6f12c6bb2711["error.exhaustive-deps-effect-events.js"]
  ac587885_e294_a1e9_b13f_5e7b920fdb42["react"]
  2ebeb1c7_3e8b_b9eb_70f2_6f12c6bb2711 --> ac587885_e294_a1e9_b13f_5e7b920fdb42
  style 2ebeb1c7_3e8b_b9eb_70f2_6f12c6bb2711 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// @validateExhaustiveEffectDependencies:"all"
import {useEffect, useEffectEvent} from 'react';

function Component({x, y, z}) {
  const effectEvent = useEffectEvent(() => {
    log(x);
  });

  const effectEvent2 = useEffectEvent(z => {
    log(y, z);
  });

  // error - do not include effect event in deps
  useEffect(() => {
    effectEvent();
  }, [effectEvent]);

  // error - do not include effect event in deps
  useEffect(() => {
    effectEvent2(z);
  }, [effectEvent2, z]);

  // error - do not include effect event captured values in deps
  useEffect(() => {
    effectEvent2(z);
  }, [y, z]);
}

Subdomains

Functions

Dependencies

  • react

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free