Тёмный

How to add Push Notifications to a Next.js App w/ Firebase Cloud Messaging! (Tutorial for Beginners) 

Sonny Sangha
Подписаться 268 тыс.
Просмотров 12 тыс.
50% 1

Free GitHub Source Code: 👉 www.papareact.com/fcm-code
🚨 Join the world’s BEST developer course & community “Zero to Full Stack Hero” NOW: www.papareact.com/course
🔴 LOOKING FOR THE CODE FROM MY OTHER BUILDS? 🛠️
links.papareact.com/github
Join me as I show you how to add & test Push notifications on iOS, Android, and Web Browsers such as Google Chrome and Safari using Firebase Cloud Messaging. You'll learn the following in this video:
👉 How to Implement Push Notifications on any Next.js App using Firebase Cloud Messaging (This configuration also lets you send iOS and Android notifications)
👉 What is Firebase Cloud Messaging and its Benefits
👉 Explaining how App States work for Notifications, such as foreground notifications (when the tab is open) and background notifications (when the tab/window is closed or out of focus)
👉 What are Service Workers & How to Implement and Debug them
👉 Explaining Firebase Cloud Messaging Best Practices
👉 How to add a toast Notification with ShadCn to handle foreground notifications
📩 WANT TO LISTEN TO THE EXCLUSIVE PAPAFAM PLAYLIST?
Sign up for the PAPAFAM Newsletter here 👉 links.papareact.com/newsletter
👇🏻FOLLOW ME HERE:
Instagram: links.papareact.com/instagram
Facebook: links.papareact.com/facebook
LinkedIn: links.papareact.com/linkedin
Twitter: links.papareact.com/twitter
Discord: links.papareact.com/discord
💰 WANT TO SUPPORT THE CHANNEL?
Donate here: links.papareact.com/donate
Grab some PAPAFAM Merch: links.papareact.com/merch
🕐 TIMESTAMPS:
00:00 Introduction
00:34 Push Notification in Firebase Cloud Messaging
01:16 Why Firebase Cloud Messaging
01:39 Explaining Firebase Cloud Messaging (1/2)
02:38 Firebase Cloud Messaging Message Types
03:20 Explaining Firebase Cloud Messaging (2/2)
03:42 Initialising the Build
04:32 Setting Up the Firebase Project
09:59 Firebase Cloud Messaging Demo
11:04 Setting Up a Messaging Campaign
14:56 Explaining App States for Notifications
16:11 What is a Service Worker?
16:40 How to Inspect & Debug a Service Worker
18:21 Purpose of Service Workers in Web Dev
20:02 Explaining How Background Messages Work
21:44 Explaining How a Service Worker Works
25:42 Implementing a Foreground State Toast Notification
32:17 Explaining the Functionality of the useFcmToken Custom Hook
50:17 Push Notification Demo for Foreground & Background App State
53:08 How & Why Tokens Are Saved to a Database
55:13 Firebase Cloud Messaging Best Practices
56:12 Summary
57:06 Join my course Zero to Full Stack Hero for more
57:55 Outro
Let’s get it PAPAFAM 🔥.
#nextjs #pushnotifications #firebase #ios #android #google #tailwindcss #typescript #testing #reactjs #javascript #nextjs15 #firebasecloudmessaging #fcm

Опубликовано:

 

24 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 68   
@SonnySangha
@SonnySangha 21 день назад
❗Join *Zero to Full Stack Hero* for *50% off* ( _48 HOUR INDEPENDANCE DAY SALE_ ) 👉www.papareact.com/course
@agadaFrancisLouis
@agadaFrancisLouis 20 дней назад
Not all heroes wear capes. Sonny you’re a saviour. Thank you🙏🏾❤️❤️❤️👏🏾👏🏾👏🏾
@SonnySangha
@SonnySangha 20 дней назад
Appreciate you!
@DigitalAlchemyst
@DigitalAlchemyst 20 дней назад
Aww i missed this so much so that youtube showed it still live on the home page. This is good info I know it cant wait to watch
@BrutalInsights
@BrutalInsights 20 дней назад
Regular ❤‍🔥 tutorial Next.js app builds has been amazing! University of Code locked in and taking over keep it coming fam!
@SonnySangha
@SonnySangha 20 дней назад
You know it!!! The PAPAFAM is in full power!
@SomtochiMkparu-i7o
@SomtochiMkparu-i7o 20 дней назад
Thanks a lot for the tutorial, I needed something like this for a side project.
@MrJeRimes
@MrJeRimes 20 дней назад
Thank you so much, i've been searching for a full tutorial for web push notification with fcm
@SonnySangha
@SonnySangha 20 дней назад
You’re welcome!!
@mileslegend
@mileslegend 20 дней назад
you always amaze me..i have been thinking about this and boom you demystifyied it .....big up bro
@SonnySangha
@SonnySangha 20 дней назад
Appreciate you brother!!!
20 дней назад
Great guide, thanks for putting this together! Notifications are sent twice though (13:05 in the video shows this). One of the notifs is rendered automatically by the browser. The other one is the service worker. Can the default browser notification be disabled?
@JanMager
@JanMager 17 дней назад
+1
@manmittiwade
@manmittiwade 19 дней назад
I'm thinking about web notification and see you are live with this ..love you brother ..❤❤❤❤
@developmentwithtariq
@developmentwithtariq 2 дня назад
Thank you for your great contribution in my life as a developer
@proflead
@proflead 10 дней назад
That's a really long and excellent tutorial! :) Agree?
@eliuddyn
@eliuddyn 21 день назад
This is Amazing 🔥🔥
@augustineudeh1584
@augustineudeh1584 20 дней назад
Thank you Sonny , God bless you ❤
@SonnySangha
@SonnySangha 20 дней назад
Thank you for supporting!!!
@PHCreatives-ge9hb
@PHCreatives-ge9hb 17 дней назад
Love it when you're doing it live😅
@SonnySangha
@SonnySangha 16 дней назад
A mix of both is perfect for all!
@usmanmarkaz
@usmanmarkaz 20 дней назад
Sonny sir me awaiting for React Native full stack projects plz plz make a project playlist just like Next js
@Deus-lo-Vuilt
@Deus-lo-Vuilt 13 дней назад
wow , nice !!
@Soap_js
@Soap_js 21 день назад
Sonny is BACK!!
@SonnySangha
@SonnySangha 20 дней назад
Yessssir!!!
@TheMrmancave
@TheMrmancave 9 дней назад
Hi Sonny, are you able to send these push notifications to iPhones and Android devices with a Next.js app?
@wafiqhosain5713
@wafiqhosain5713 20 дней назад
Sonny Max, Sonny Live, love ur content, bruh...
@ninoaarondacua5975
@ninoaarondacua5975 15 дней назад
is this working in vercel?
@johnedet4551
@johnedet4551 12 дней назад
Also can you build an app, where an admin can send push notification to all his subscriber, whose tokens have been saved to the db. This would be a nice feature in an app.
@dariod7322
@dariod7322 17 дней назад
Can I do this using plain react and js? I don't know typescript and nextJs yet.
@SonnySangha
@SonnySangha 16 дней назад
Ofcourse you can!
@user-su7ew8id4e
@user-su7ew8id4e 17 дней назад
Hey , thanks for this wonderful video , does it work with PWA ?
@JanMager
@JanMager 17 дней назад
of course, yes
@user-su7ew8id4e
@user-su7ew8id4e 16 дней назад
@@JanMager thanks for the answer
@talhaboyraz
@talhaboyraz 14 дней назад
not working on ios. is there any way to chrome push notification on ios.
@juanpablocs21
@juanpablocs21 20 дней назад
great job. one question, this fcm is working in ios chrome?
@SonnySangha
@SonnySangha 20 дней назад
Yessir!
@anshsingh03
@anshsingh03 20 дней назад
Amazing video...... I need your help regarding notification in Safari......
@SonnySangha
@SonnySangha 20 дней назад
Ask away, ideally in www.universityofcode.com
@anshsingh03
@anshsingh03 18 дней назад
​@@SonnySangha thanks
@CYCLONE_2XL
@CYCLONE_2XL 21 день назад
Best ❤
@SonnySangha
@SonnySangha 21 день назад
Thanks for the support!
@salyiohh
@salyiohh 20 дней назад
we need this for react native expo project
@SonnySangha
@SonnySangha 20 дней назад
I hear you!
@johnedet4551
@johnedet4551 12 дней назад
This doesn't work on safari.. You have any reason why?
@suchitraswain1525
@suchitraswain1525 20 дней назад
it's not working on the hosted URL, is there anything we need to config?
@SonnySangha
@SonnySangha 20 дней назад
I can’t help with this much information… it does work!
@user-sz9rf8hz5e
@user-sz9rf8hz5e 20 дней назад
@@SonnySangha I hosted in firebase hosting using functions it's showing 500 error
@adloukondo2148
@adloukondo2148 19 дней назад
Salut, ttu peux nouus aider avec un tutoriel OTP. avec firebase +nextjs
@SonnySangha
@SonnySangha 19 дней назад
Salut, Ofcourse I’m on it!
@adloukondo2148
@adloukondo2148 19 дней назад
@@SonnySangha Merci beaucoup papa react 💖💖
@kwamenadadson
@kwamenadadson 21 день назад
please can i get the source code
@SonnySangha
@SonnySangha 21 день назад
First link in description!
@kwamenadadson
@kwamenadadson 20 дней назад
@@SonnySangha Thanks but now only the foreground works without the background
@SonnySangha
@SonnySangha 17 дней назад
Need to run in HTTPS to register the service worker, check your package JSON and enable experimental-https flag
@HKML629
@HKML629 21 день назад
Hello my Boss
@SonnySangha
@SonnySangha 21 день назад
Yo!!!! Enjoy the vid bro!
@HKML629
@HKML629 21 день назад
@@SonnySangha Sure Brother
@HKML629
@HKML629 21 день назад
@@SonnySangha I really learn alot from you i wants to show to you a project i've made to hear your insights
@SonnySangha
@SonnySangha 20 дней назад
Join the university of code Skool community and share inside! Www.universityofcode.com
@HKML629
@HKML629 19 дней назад
@@SonnySangha I do join now
@bernardyamoah1284
@bernardyamoah1284 21 день назад
💯💯😊
@SonnySangha
@SonnySangha 21 день назад
Appreciate you!
@aakash8010
@aakash8010 21 день назад
😘😘🤩😍🥰😇
@flutter-fm1kl
@flutter-fm1kl 19 дней назад
No one use RN😂
Далее
HTMX Sucks
25:16
Просмотров 111 тыс.
Learn to code with an unfair advantage.
15:05
Просмотров 170 тыс.
Every React Concept Explained in 12 Minutes
11:53
Просмотров 492 тыс.
There's A New Browser (That ISN'T Chrome Based)
47:59
Просмотров 123 тыс.
This is Why Programming Is Hard For you
10:48
Просмотров 715 тыс.
These coding projects give you an unfair advantage
8:13