TypeScript Front-End interview question explained: useFetch React Hook

Опубликовано: 09 Февраль 2023
на канале: 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


Смотрите видео TypeScript Front-End interview question explained: useFetch React Hook онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Code Tour 09 Февраль 2023. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 821 раз и оно понравилось 39 посетителям.