React Hooks

By James Dietrich
React Hooks Guide: How To Use Tutorial, Use Cases, Examples

React Hooks are a newly proposed feature that lets you use state and life-cycle methods without writing a class component.

By Pierre Ouannes
How To Use The React useReducer Hook (with Examples)

useReducer is quite an advanced hook that beginners often don’t really know how to use. But this hook can be very useful for writing better and clearer code! If you’re not sure of what useReducer does, read on to learn more! What is the useReducer hook? You can think of useReducer as a “state” hook, […]

By Pierre Ouannes
How To Use React useRef Hook (with Examples)

What is the `useRef` hook? How do you use it? When should you use `useRef` vs `useState`? What caveats should you be aware of when using `useRef`?

By James Dietrich
How to Use the setState Callback in React

To perform an action in a React component after calling setState, such as making an AJAX request or throwing an error, we use the setState callback.

By James Dietrich
Simplifying React State and the useState Hook

In this lesson, we’ll cover React state, how it works, and how we can use the useState Hook to build a simple dice rolling app. Let’s begin!

By James Dietrich
Build a Todo App in React Using Hooks

Build a simple todo app using React and React Hooks. This is a perfect starting tutorial for beginner and intermediate React developers.

By James Dietrich
Build a React Timer Component Using Hooks

Build a React timer component using the useState and useEffect Hooks in minutes. A React timer component is a great way to learn React, so let’s begin!

By James Dietrich
setInterval in React Components Using Hooks

Using setInterval inside React components allows us to execute a function or some code at specific intervals. Let’s explore how to use setInterval in React.

By James Dietrich
setTimeout in React Components Using Hooks

Use setTimeout in your React components to execute a function or block of code after a period of time. Let’s explore how to use setTimeout in React.

By James Dietrich
Modal Components in React Using Custom Hooks

Building modal dialogs in React is a challenge due to their architectural and accessibility complications. However, there is an easy solution.

By James Dietrich
How to Use the useContext Hook in React

Let’s explore the React useContext Hook by building a music player! I’ll also show you how a custom React Hook can make the useContext Hook easier to use.

By James Dietrich
Form Validation Using Custom React Hooks

Build a form validation engine using custom React Hooks, from scratch, without having to learn a single form library. Read on to learn how!

By James Dietrich
Using Custom React Hooks to Simplify Forms

Use custom React Hooks to build forms that require half the code to write, are reusable, and are much easier to read. Read on to learn more!

By James Dietrich
Build an Infinite Scroll Component in React using React Hooks

Today we’re going to dive deeper into React development and learn how to build an infinite scroll component in React using React Hooks. Let’s get started!