Home / Function/ ComponentWithoutDeclaringPropAsDep() — react Function Reference

ComponentWithoutDeclaringPropAsDep() — react Function Reference

Architecture documentation for the ComponentWithoutDeclaringPropAsDep() function in index.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  d20298a1_a636_80f9_202a_0904d2b90e1a["ComponentWithoutDeclaringPropAsDep()"]
  b33e75ba_61cb_bac4_209f_a34cd3203f8b["index.js"]
  d20298a1_a636_80f9_202a_0904d2b90e1a -->|defined in| b33e75ba_61cb_bac4_209f_a34cd3203f8b
  style d20298a1_a636_80f9_202a_0904d2b90e1a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fixtures/eslint-v8/index.js lines 64–92

function ComponentWithoutDeclaringPropAsDep(props) {
  useEffect(() => {
    console.log(props.foo);
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, []);
  useCallback(() => {
    console.log(props.foo);
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, []);
  useMemo(() => {
    console.log(props.foo);
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, []);
  React.useEffect(() => {
    console.log(props.foo);
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, []);
  React.useCallback(() => {
    console.log(props.foo);
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, []);
  React.useMemo(() => {
    console.log(props.foo);
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, []);
  React.notReactiveHook(() => {
    console.log(props.foo);
  }, []); // This one isn't a violation
}

Domain

Subdomains

Frequently Asked Questions

What does ComponentWithoutDeclaringPropAsDep() do?
ComponentWithoutDeclaringPropAsDep() is a function in the react codebase, defined in fixtures/eslint-v8/index.js.
Where is ComponentWithoutDeclaringPropAsDep() defined?
ComponentWithoutDeclaringPropAsDep() is defined in fixtures/eslint-v8/index.js at line 64.

Analyze Your Own Codebase

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

Try Supermodel Free