What is React Hooks?
Also called: Hooks
The short answer
Hooks are React functions, like useState and useEffect, that let components hold state and run side effects such as fetching data or subscribing to events.
React Hooks, explained
Effects must clean up after themselves (listeners, timers, subscriptions) or the page leaks memory and runs duplicate work.
Questions people ask about React Hooks
What is React Hooks?
Hooks are React functions, like useState and useEffect, that let components hold state and run side effects such as fetching data or subscribing to events.
Related terms
React is a JavaScript library for building user interfaces from reusable components that update automatically when their data changes.
Props and stateIn component frameworks, props are the inputs a component receives from its parent, and state is the data a component manages itself that changes over time.
DOMThe DOM is the browser's live, tree-shaped model of a web page; JavaScript reads and changes the DOM to update what visitors see.
Semantic HTMLSemantic HTML uses elements for their meaning, such as header, nav, main, article, button and h1 to h6, instead of generic divs, so machines understand the page.
Part of the Web Encyclopedia by Apex Flow Digital. Definitions are general knowledge, kept current, with no invented statistics.