Home / File/ error.non-inlined-effect-fn.js — react Source File

error.non-inlined-effect-fn.js — react Source File

Architecture documentation for error.non-inlined-effect-fn.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
  5163e88b_7bf6_8b88_89ad_3486ef4bc109["error.non-inlined-effect-fn.js"]
  ac587885_e294_a1e9_b13f_5e7b920fdb42["react"]
  5163e88b_7bf6_8b88_89ad_3486ef4bc109 --> ac587885_e294_a1e9_b13f_5e7b920fdb42
  style 5163e88b_7bf6_8b88_89ad_3486ef4bc109 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// @inferEffectDependencies @panicThreshold:"none"
import {useEffect, AUTODEPS} from 'react';

/**
 * Error on non-inlined effect functions:
 * 1. From the effect hook callee's perspective, it only makes sense
 *    to either
 *    (a) never hard error (i.e. failing to infer deps is acceptable) or
 *    (b) always hard error,
 *    regardless of whether the callback function is an inline fn.
 * 2. (Technical detail) it's harder to support detecting cases in which
 *    function (pre-Forget transform) was inline but becomes memoized
 */
function Component({foo}) {
  function f() {
    console.log(foo);
  }

  // No inferred dep array, the argument is not a lambda
  useEffect(f, AUTODEPS);
}

Subdomains

Functions

Dependencies

  • react

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free