New React Hooks with NextJS Server Actions (2024)

  Рет қаралды 1,610

Taylor Lindores-Reeves

Taylor Lindores-Reeves

Күн бұрын

Dive into my latest tutorial on the experimental useFormStatus and useFormState hooks! Discover how to enhance your web applications with server-side capabilities, enabling features like comment systems. This comprehensive guide walks you through the installation of these new hooks and demonstrates their potential with a practical example. I tackle the nuances of creating a comment system, showcasing the and progressive enhancement technique-your comments remain interactive even with JavaScript disabled.
📖 Chapters:
00:00 - Intro & What We’ll Build
01:57 - Project Codebase Overview
03:15 - Building The Comments Component
05:00 - Building The Comment Card Component
08:00 - Building The Comment Component
08:55 - Implementing The useFormState hook
10:05 - Overview of Comment Server Actions
16:25 - Building The Edit Comment Component
21:55 - Building The Add Comment Component
26:00 - Building The Vote Component
32:00 - Testing The Functionality & Outro
✅ Key Takeaways:
1. Learn how to build progressively enhanced forms in Next.js
2. Learn how to implement useFormState and useFormStatus hooks
3. Learn how to build comments with create, edit, delete and vote functionality
🔗 Resources:
- Database Session Authentication: • Database Session Authe...
- NextJS App Router: nextjs.org/docs
- Prisma ORM: www.prisma.io/nextjs
- React useFormState Hook: react.dev/reference/react-dom...
- React useFormStatus Hook: react.dev/reference/react-dom...
- Server Actions: nextjs.org/docs/app/api-refer...
- Source code: github.com/taylor-lindores-re...
I hope you enjoyed this tutorial. If you have any questions, please let me know in the comments!

Пікірлер: 6
@sandryeyev
@sandryeyev 8 ай бұрын
good example with a good explanation! thank you!
@taylorlindoresreeves
@taylorlindoresreeves 8 ай бұрын
Much appreciated 🙌
@iqbalmuhtadin5614
@iqbalmuhtadin5614 6 ай бұрын
Your video is great, friend. but I have a suggestion. It would be nice if the code editor display was enlarged because I think the text is too small. keep up the good work, friend
@taylorlindoresreeves
@taylorlindoresreeves 6 ай бұрын
Thanks for the feedback, I’ll take note for future videos 📝
@wahidlahlou
@wahidlahlou 7 ай бұрын
Hi Taylor! Your videos are great 👍 But I often view them on my phone and your resolution is too high so I have trouble reading the code.
@taylorlindoresreeves
@taylorlindoresreeves 6 ай бұрын
Okay, thanks for the feedback, will ensure it’s 1080p for future vids 📝
I Fixed Next.js Server Actions
11:42
Theo - t3․gg
Рет қаралды 57 М.
My Problem with Next.js Server Actions
10:13
James Q Quick
Рет қаралды 16 М.
Получилось у Миланы?😂
00:13
ХАБИБ
Рет қаралды 4,2 МЛН
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 9 МЛН
Server Actions: NextJS 13.4's Best New Feature
21:41
Jack Herrington
Рет қаралды 60 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 558 М.
NextJS 14 Server Action Controversy!
21:37
Jack Herrington
Рет қаралды 25 М.
Reflecting on React Server Components
26:33
Theo - t3․gg
Рет қаралды 44 М.
Server-side Pagination with NextJS 13 Server Actions
19:27
Taylor Lindores-Reeves
Рет қаралды 10 М.
Pure React vs Next.js | What’s Happening in React?
12:23
Lama Dev
Рет қаралды 53 М.
All 29 Next.js Mistakes Beginners Make
1:45:10
ByteGrad
Рет қаралды 97 М.