This is your channel and you want to get more insights ?
180K
subs.
425
videos
0
views
Score
505
@jherr

React 19's useOptimistic: EVERYTHING you NEED to know

Published on Mon, Jun 24th 2024 Science & Technology Rectangular HD

useOptimistic makes your pokey backend feel fast with optimistic updates to your UI. It's simple to use, but we'll covert the gotcha, as well as how to use it with React Query and also whether or not you should use it with a state manager.

Code: https://github.com/jherr/useOptimistic-video

👉 Upcoming NextJS course: https://pronextjs.dev
👉 Don't forget to subscribe to this channel for more updates: https://bit.ly/2E7drfJ
👉 Discord server signup: https://discord.gg/ddMZFtTDa5
👉 VS Code theme and font? Night Wolf [black] and Operator Mono
👉 Terminal Theme and font? oh-my-posh with powerlevel10k_rainbow and SpaceMono NF

00:00 Introduction
00:50 Creating a simple API server
03:05 Setting up Pico CSS
04:40 Connecting to the API server
05:43 Posting todos to the server
06:54 Bring on useOptimistic with 19
09:04 When to call the useOptimistic setter
10:10 useOptimistic with a transition
11:10 Potential issues with useTransition
11:56 Reducer variant of useOptimistic
12:48 Error handling
14:25 Using a form action
16:00 useActionState
17:28 Integrating with React Query
18:02 Don’t fear the peer deps warning
19:48 Using React Query’s useMutation
21:32 Once more, but with Zustand
24:09 State manager or useOptimistic
24:29 Outroduction

General statistics

Total Views
Total
11,687
Likes
Total
xxx.xx
Comments
Total
xxx.xx
Length
Total
00:25:24

Metadata

Tags

useoptimistic useoptimistic next js react 19 react useoptimistics useoptimistic react nextjs 15 react server components react conf next 15 react 19 compiler react use useoptimistic hook react js react 18 nextjs usesuspensequery suspense in react react lazy suspense nextjs react router react router suspense useOptimistic useOptimistic next useOptimistic nextjs useOptimistic hook react 19 useoptimistic useoptimistic nextjs jack herrington

Topics

Knowledge Technology

Videolists

No videolist for this video.

Content

No format for this video.

Public statistics

Total Views

Generating graph...

Total Views

Generating graph...

Likes

Generating graph...

Comments

Generating graph...

Private statistics

Watch time

This widget is only available to channel's owner.

Sign in

Subscribers gained

This widget is only available to channel's owner.

Sign in

Shares

This widget is only available to channel's owner.

Sign in

Estimated demography

This widget is only available to channel's owner.

Sign in

Estimated audience

This widget is only available to channel's owner.

Sign in
We use cookies to ensure you get the best experience on our website. By using our site you agree to the following Terms of use and Privacy policy. Accept
Automatic summary
This YouTube channel provides in-depth tutorials and discussions on various web development technologies, focusing on JavaScript, React, Next.js, and other related frameworks and tools. The channel aims to educate and inform developers about best practices, new features, and cutting-edge techniques, while also providing critical analysis and comparisons of different tools and approaches. Viewers can expect to gain insights into performance optimization, memory management, API design, and more, as well as learn about emerging technologies and trends in the web development industry.
Description
Frontend videos from basic to very advanced; tutorials, technology deep dives. You'll love it!
Estimated D+30 views based on the views already made to date and the number of days remaining before the 30th day of publication