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
  e9a2d94b_3647_0d24_7544_51befecc8b15["ComponentWithoutDeclaringPropAsDep()"]
  b37fd580_cdf0_160a_3e0a_de15ebb8ec3c["index.js"]
  e9a2d94b_3647_0d24_7544_51befecc8b15 -->|defined in| b37fd580_cdf0_160a_3e0a_de15ebb8ec3c
  style e9a2d94b_3647_0d24_7544_51befecc8b15 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fixtures/eslint-v9/index.js lines 64–94

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
  }, []);
  // eslint-disable-next-line react-hooks/void-use-memo
  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
  }, []);
  // eslint-disable-next-line react-hooks/void-use-memo
  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-v9/index.js.
Where is ComponentWithoutDeclaringPropAsDep() defined?
ComponentWithoutDeclaringPropAsDep() is defined in fixtures/eslint-v9/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