Exploring React 19 Features – use() Hook, Actions & More
In this video, we will look at some of the features of React 19 including the React compiler, use() hook, form actions, new hooks like useFormState(), useFormStatus() and useOptimistic().
Code:
https://github.com/bradtraversy/react-19-playground
Check out my courses:
https://traversymedia.com
Social Media:
Github – https://github.com/bradtraversy
Twitter – https://twitter.com/traversymedia
Instagram – https://www.instagram.com/traversymedia
Facebook – https://www.facebook.com/traversymedia
Linkedin – https://www.linkedin.com/in/bradtraversy
Timestamps:
0:00 – Intro
1:24 – Compiler Info (Slide)
3:05 – Automatic Memoization (Slide)
4:04 – use() Hook Info (Slide)
4:57 – use client & use server (Slide)
5:43 – Actions (Slide)
6:54 – useOptimistic (Slide)
7:40 – Metadata (Slide)
8:06 – Other Changes (Slide)
9:48 – React 19 Playground Intro
10:53 – use() Hook to Fetch Joke
15:34 – use() Hook to Fetch Posts
17:05 – use() Hook with Promise
21:16 – use() Hook with Context
23:32 – Action Example 1 – Post Form
29:25 – Action Example 2 – Shopping Cart Form
35:25 – useFormStatus()
39:49 – useFormState()
44:12 – useOptimistic()
source