Home / Function/ functionError() — react Function Reference

functionError() — react Function Reference

Architecture documentation for the functionError() function in ESLintRulesOfHooks-test.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  63368e7e_a438_b329_e161_93bcc2108596["functionError()"]
  dd0557d9_69a8_cf13_71c6_3353d5972ec8["ESLintRulesOfHooks-test.js"]
  63368e7e_a438_b329_e161_93bcc2108596 -->|defined in| dd0557d9_69a8_cf13_71c6_3353d5972ec8
  style 63368e7e_a438_b329_e161_93bcc2108596 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js lines 2046–2054

function functionError(hook, fn) {
  return {
    message:
      `React Hook "${hook}" is called in function "${fn}" that is neither ` +
      'a React function component nor a custom React Hook function.' +
      ' React component names must start with an uppercase letter.' +
      ' React Hook names must start with the word "use".',
  };
}

Domain

Subdomains

Frequently Asked Questions

What does functionError() do?
functionError() is a function in the react codebase, defined in packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js.
Where is functionError() defined?
functionError() is defined in packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js at line 2046.

Analyze Your Own Codebase

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

Try Supermodel Free