Module 7 Introduction

Introduction to Module 7.0.

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

This lesson preview is part of the TinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.

This video is available to students only
Unlock This Course

Get unlimited access to TinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL, plus 70+ \newline books, guides and courses with the \newline Pro subscription.

Thumbnail for the \newline course TinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL

In our last module, we gave our client the ability to make a request to our API . However, we haven't been able to display any information in our UI just yet. In this module, we're going to use React Hooks to display data in our UI as well as handle our GraphQL API request. But what is a React Hook? Well React Hooks are just functions that allow components to hook into React- specific features. In this module, we'll introduce and explain what React Hooks are. Use React's use State Hook to keep track of component state. Use React's use effect hook to help make our GraphQL query when our component first mounts. Create our own custom use query hook that consolidates the functionality to make a query when a component mounts. Trapellate a refetch property from our use query hook to help our components retrigger a query after the component has already been mounted. Retrieve the loading and error status of our query made with the use query hook . Create a use mutation hook that provides a request function to conduct mutations. And finally, use React's use a reducer hook to recognize a different way to handle state and state changes in our custom hooks. (upbeat music)