Uploaded August 2023 | Updated November 2026, 3 hours ago
Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap
Learn how to create a reusable modal in Next.js & React. You will learn the difference between a modal and a dialog, one big difference when building a modal for Next.js vs React, and why managing the modal state with URL params is a better choice than useState.
π Support me on Patreon β patreon.com/davegray
β Become a full-stack web dev with Zero To Mastery Courses:
- Complete Next.js Developer: bit.ly/CompNextJSDev
- Advanced React: bit.ly/AdvReactDev
- Junior to Senior Dev Roadmap: bit.ly/WebDevRoadmap-JrtoSr
π© Subscribe β bit.ly/3nGHmNn
π¬ Course Updates β https://courses.davegray.codes/
β Questions - Please post them to my Discord β discord.gg/neKghyefqh
β Buy Me A Coffee β buymeacoffee.com/davegray
π Follow Me On Social Media:
GitHub: github.com/gitdagray
Twitter: twitter.com/yesdavidgray
LinkedIn: linkedin.com/in/davidagray
π Source Code: github.com/gitdagray/next-dialog-modal
Modal in Next.js & React | Create a Dialog Component
(00:00) Intro
(00:15) Welcome
(00:37) Lesson Goals
(01:05) Starter Code Review
(02:29) Creating the Dialog Component
(13:51) Adding the Dialog to a page
(15:00) A Big Difference between Next.js & React
(17:24) Enabling Server Actions in Next.js
(18:20) Viewing the differences between Modals & Dialogs
(21:03) Why manage state with URL Params?
(22:15) Wrap up
π Tutorial References:
π Next.js Official Site: nextjs.org
π Next.js Server Actions: nextjs.org/docs/app/building-your-application/data-fetching/server-actions
Was this tutorial about building a Modal in Next.js & React helpful? If so, please share. Let me know your thoughts in the comments.
#nextjs #modal #dialog
Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap
Learn how to create a reusable modal in Next.js & React. You will learn the difference between a modal and a dialog, one big difference when building a modal for Next.js vs React, and why managing the modal state with URL params is a better choice than useState.
π Support me on Patreon β patreon.com/davegray
β Become a full-stack web dev with Zero To Mastery Courses:
- Complete Next.js Developer: bit.ly/CompNextJSDev
- Advanced React: bit.ly/AdvReactDev
- Junior to Senior Dev Roadmap: bit.ly/WebDevRoadmap-JrtoSr
π© Subscribe β bit.ly/3nGHmNn
π¬ Course Updates β https://courses.davegray.codes/
β Questions - Please post them to my Discord β discord.gg/neKghyefqh
β Buy Me A Coffee β buymeacoffee.com/davegray
π Follow Me On Social Media:
GitHub: github.com/gitdagray
Twitter: twitter.com/yesdavidgray
LinkedIn: linkedin.com/in/davidagray
π Source Code: github.com/gitdagray/next-dialog-modal
Modal in Next.js & React | Create a Dialog Component
(00:00) Intro
(00:15) Welcome
(00:37) Lesson Goals
(01:05) Starter Code Review
(02:29) Creating the Dialog Component
(13:51) Adding the Dialog to a page
(15:00) A Big Difference between Next.js & React
(17:24) Enabling Server Actions in Next.js
(18:20) Viewing the differences between Modals & Dialogs
(21:03) Why manage state with URL Params?
(22:15) Wrap up
π Tutorial References:
π Next.js Official Site: nextjs.org
π Next.js Server Actions: nextjs.org/docs/app/building-your-application/data-fetching/server-actions
Was this tutorial about building a Modal in Next.js & React helpful? If so, please share. Let me know your thoughts in the comments.
#nextjs #modal #dialog










