background
background
background
background
background
background
background
Knowledge Base
generalintermediate

Data Fetching Hooks — Documentation

The page is a high-level overview of the React reference documentation, explaining how the API is organized and where different kinds of hooks and APIs live. It distinguishes between core React features, React DOM features for the browser, the React Compiler, and tools like the ESLint plugin and Rules of Hooks. Data fetching hooks would be documented within the broader Hooks sections for React and React DOM, following these organizational principles.
1 min read0 views0 helpful
React’s reference is organized into functional sections: core React, React DOM, React Compiler, ESLint plugin, Rules of React, and Legacy APIs.Hooks are a primary way to use React features from components and are documented separately for core React and React DOM.React DOM adds browser-specific hooks, components, and APIs that only make sense in a DOM environment.The React Compiler and ESLint plugin support writing performant and correct hook-based code by enforcing rules and optimizing components.Rules of React and Rules of Hooks define constraints (like purity and call order) that all hooks, including data fetching hooks, must follow.

Learn this with Vidya

Have an AI tutor explain this concept to you through voice conversation

Start Session

This page is an overview of how the React documentation is structured, which is important context for where data fetching hooks fit in.

React’s core reference is divided into several major areas:

  • React (core): Includes Hooks, Components, APIs, and Directives. The Hooks section is where you find functions that let components use React features (for example, state, context, or, in other parts of the docs, data fetching patterns). These hooks are environment-agnostic.

  • React DOM: Focused on web applications that run in the browser. It has its own Hooks section for DOM-specific hooks, plus Components (HTML/SVG tags) and APIs split into client, server, and static rendering utilities. Any browser-only data fetching or rendering patterns would be documented here.

  • React Compiler: A build-time optimization tool that can automatically memoize components and values. This matters for data fetching hooks because compiler-aware, pure components are easier to optimize and avoid unnecessary re-renders.

  • ESLint Plugin React Hooks: Enforces the Rules of Hooks, such as calling hooks only at the top level of components and custom hooks. This is crucial for data fetching hooks, which must obey these rules to behave predictably.

  • Rules of React: Emphasize that components and hooks must be pure and that React controls when they are called. All data fetching hooks must be designed around these rules, typically by triggering side effects (like network requests) in the appropriate hook APIs.

Finally, Legacy APIs are listed as still exported but discouraged for new code, signaling that modern patterns—especially hook-based ones—are preferred for tasks like data fetching.

Was this article helpful?

Comments

Sign in to leave a comment