Grokking React Fundamentals
Vote

0% completed

​

Types of Hooks in React

The react package in version 19.3 exports 19 functions whose names begin with use. You do not need all of them to build an app. Most components use two or three, and several exist mainly for library authors. The React documentation groups the built-in hooks by the job each one does, and knowing the groups tells you which hook to look for when a component needs something new.

You import a hook by name from the react package and call it at the top level of the component, as the previous lesson explained:

import { useState, useRef } from 'react';

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content