Lessons

Explore all newline lessons

Tags
Author
Pricing
Sort By
Video
Most Recent
Most Popular
Highest Rated
Reset
How to Use React's useReducer Hook to Handle State

lesson

How to Use React's useReducer Hook to Handle StateTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL

In this lesson, we'll configure the useQuery and useMutation Hooks we've created to use another state management Hook to handle state. We'll use React's useReducer Hook.

How to Customize the React useMutation Hook

lesson

How to Customize the React useMutation HookTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL

In this lesson, we'll create a custom useMutation Hook which will abstract the server fetch functionality needed to conduct a mutation from a component.

Customize GraphQL Errors with React useQuery Hook

lesson

Customize GraphQL Errors with React useQuery HookTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL

In this lesson, we'll address how we can handle the loading and error state of our GraphQL queries with our custom useQuery Hook.

How to Manually Refetch React useQuery Hook Data

lesson

How to Manually Refetch React useQuery Hook DataTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL

In this lesson, we'll introduce the capability for a component to manually refetch a query from the useQuery Hook.

How to Customize the React useQuery Hook

lesson

How to Customize the React useQuery HookTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL

With React's useState and useEffect Hooks, we've been able to query and display listings information the moment our Listings component is mounted. In this lesson, we'll create our very own custom useQuery Hook that will consolidate the pattern of creating a state property, using the useEffect Hook, and running the server fetch() function to make a query and state update when a component mounts.

How to Use the React useEffect Hook

lesson

How to Use the React useEffect HookTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL

We've managed to use the useState Hook to track and display listings data to our UI. In this lesson, we'll introduce the useEffect Hook and see how we can create an effect callback to query listings data the moment our component mounts.

How to Use the React useState Hook

lesson

How to Use the React useState HookTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL

Though we've been able to create a custom fetch() function to help us make the GraphQL requests to query listings or delete a certain listing, we've only seen the results of our requests in our browser console. In this lesson, we'll introduce and use React's useState Hook to track listings state value in our function component with which we'll be able to use and display in our UI.

What are React Hooks? An Intro to Reusing Logic in React

lesson

What are React Hooks? An Intro to Reusing Logic in ReactTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL

In this lesson, we discuss the motivation behind React Hooks and see a few examples of how React Hooks can help share logic between our React components.

How to Delete MongoDB Listing With GraphQL API

lesson

How to Delete MongoDB Listing With GraphQL APITinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL

In this lesson, we'll use our custom server fetch() function to invoke the deleteListing mutation we have in our GraphQL API, to delete a listing in our listings collection.

How to Type Data from GraphQL With TypeScript Generics

lesson

How to Type Data from GraphQL With TypeScript GenericsTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL

Although the custom server fetch() function we've established in the last lesson works, the data being returned isn't appropriately typed. In this lesson, we'll take advantage of TypeScript generics to ensure we get queried data from our server fetch() function with the appropriate type.

Making GraphQL Requests With POST and fetch

lesson

Making GraphQL Requests With POST and fetchTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL

Numerous tools and libraries exist to help clients make GraphQL requests to a GraphQL API. Before we begin to introduce a third-party library to help make our GraphQL requests, we'll look to make our requests with the help of the window Fetch API. In this lesson, we'll begin to make the connection between our React client and Node server and see if we can query the listings query from our GraphQL API.