TypeScript Front-End interview question explained: useFetch React Hook

Published: 09 February 2023
on channel: Code Tour
821
39

Hi, my name is Chris and I'm a Senior Frontend Engineer in New York City, and I hope this video helps you understand:
What is the useFetch custom React Hook?
What is a custom hook?
What is a Reducer pattern and how does it relate to State Machines?
How can I write React with TypeScript?
How can I create a NextJS Project?

I mostly use TypeScript, NextJS and React in my day-to-day work so the examples shown in this video will reflect these technologies.

I hope you enjoy, and please share with a friend!
Comments and suggestions are appreciated.

00:00 Intro
00:31 What does useFetch do?
00:59 React Project Overview
01:42 NextJS + TypeScript Project Setup
04:15 Creating display React Component
11:38 Setting up the useFetch hook
13:08 Creating a Reducer
21:20 Writing the useFetch Hook
35:09 Integrate useFetch hook in Component
40:12 Improvements and Caching
44:05 Outro

RESOURCES:

Matt Pocock on Return Types:
[   • Should you use return types?  ](   • Should you use return types?  )

Code example from useHooks site with optional Cancel mid-call feature:
[https://usehooks-ts.com/react-hook/us...](https://usehooks-ts.com/react-hook/us...)

Shoutout to some friends in helping craft the code example for this video:
@JongsunSuh
@PushToProdOnFridays
@DanielNaganoGerace


Watch video TypeScript Front-End interview question explained: useFetch React Hook online, duration hours minute second in high quality that is uploaded to the channel Code Tour 09 February 2023. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 821 times and liked it 39 visitors.