Will React's New Cache Fix Its "Use" Hook?

Опубликовано: 20 Март 2023
на канале: Jack Herrington
48,434
2k

Can React 18's new `cache` function save the `use` hook and give us the `use(fetch())` pattern that we didn't ask for and probably won't use instead of react-query or SWR?

Code: https://github.com/jherr/nextjs-react...

👉 I'm a host on the React Round-Up podcast: https://devchat.tv/podcasts/react-rou...
👉 Don't forget to subscribe to this channel for more updates: https://bit.ly/2E7drfJ
👉 Discord server signup:   / discord  
👉 VS Code theme and font? Night Wolf [black] and Operator Mono
👉 Terminal Theme and font? oh-my-posh with powerlevel10k_rainbow and SpaceMono NF

0:00 Introduction
1:21 Project Setup
2:50 Using The Use Hook
5:53 Trying Out Cache
8:39 Caching Fetch
10:22 Sharing The Cache
13:46 Bringing In Context
17:12 Architecting Around Cache
18:26 Summing Up
19:26 Outroduction