How to send firebase push notification in React| React push Notification |Firebase push notification

How to send firebase push notification in React| React push Notification |Firebase push notification

AVDojo

4 года назад

78,420 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@swetabose66
@swetabose66 - 09.04.2020 22:51

👌

Ответить
@hungry_traveller31
@hungry_traveller31 - 20.04.2020 23:41

Bro ek live MERN STACK p project sikha do

Ответить
@bumuthudilshan5395
@bumuthudilshan5395 - 26.04.2020 18:50

Will this work in react native?

Ответить
@marclorryagenat305
@marclorryagenat305 - 02.06.2020 03:37

Making extra revenue from the same amount of traffic is something that most publishers overlook! All you need is additional ad network and various ad formats – for example, I use MonadPlug Push Notifications, In-page Push and Native ads in combination with Google AdSense Ads... Revenue boosted by 500% in easy few steps!

Ответить
@jeremysimonkleinangely537
@jeremysimonkleinangely537 - 09.06.2020 20:17

Man ! Love you so much ! I've passed hours looking for a solution about "where I've to put the sw.js file" ! Was in the public folder of my meteorJS app ! :D
You have a new follower ! :D

Ответить
@jindev4901
@jindev4901 - 21.06.2020 17:14

Great Tutorial. How can I create notification on click?

Ответить
@reksmeymom1428
@reksmeymom1428 - 02.07.2020 07:18

I got console print error

Ответить
@greykrav1869
@greykrav1869 - 17.07.2020 18:21

I forked the repo, followed his tutorial exactly. no browser notification was shown. it did not work.

Ответить
@AbhishekGanotra
@AbhishekGanotra - 29.07.2020 00:13

Not getting any notification dude ,followed exactly same thing

Ответить
@viczking8520
@viczking8520 - 26.08.2020 11:38

didn't work

Ответить
@DaliborHomola
@DaliborHomola - 08.09.2020 13:06

Thanks for the instructions, but I also get a token in the console, but I don't get notifications. I did everything right from the video, I have also turn on notifications... Any update how to fix? Anyone :)

Ответить
@shraddhapathradkar7812
@shraddhapathradkar7812 - 09.09.2020 17:21

Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app).


can you please tell who to solve this error?

Ответить
@movilui7060
@movilui7060 - 30.09.2020 02:44

works for ios ?

Ответить
@mahlasurya
@mahlasurya - 06.10.2020 14:07

How can we use this in production so that we can send push notifications to all devices where our Web site is running?

Ответить
@yagneshd1748
@yagneshd1748 - 02.11.2020 12:05

For those who couldn't get notification

Here is what worked for me,
1) console.firebase.google.com> firebase-cloud-messaging/*project name*/>settings>Cloud Messaging Tab> Copied the server key
2) In firebase-messaging-sw.js file, inside
firebase.initializeApp({
'apiKey': "/*Pasted Server Key here*/

Ответить
@Aladinyo_93
@Aladinyo_93 - 12.11.2020 21:54

Registration failed - push service error I keep getting this error and everything is done correctly

Ответить
@nagendrasuryawanshi4100
@nagendrasuryawanshi4100 - 24.11.2020 16:08

Got Error : DOMException: Failed to execute 'importScripts'

Ответить
@sagarghosh3434
@sagarghosh3434 - 01.12.2020 10:44

wil this token remain same or will b changed after reload ?

Ответить
@rezaandriansyah279
@rezaandriansyah279 - 10.03.2021 03:43

thanks bro..

Ответить
@timelapse5687
@timelapse5687 - 18.03.2021 20:17

Recommended

Ответить
@davidaxelgonzalezflores3536
@davidaxelgonzalezflores3536 - 18.03.2021 21:56

I followed the tutorial and this works for development (npm run start) but doesnt work when create a build for production because i use the default create react app pwa confugurations ( serviceWorkerRegistration.register(); ). There is any way to enable this in production too?

Ответить
@rafaelalvescardoso1233
@rafaelalvescardoso1233 - 17.05.2021 18:42

Doesn't work on ios devices?

Ответить
@faustinomaggioniduffy3045
@faustinomaggioniduffy3045 - 23.05.2021 18:31

It´s necessary to do a class component?

Ответить
@akhilharwadekar5009
@akhilharwadekar5009 - 13.06.2021 10:37

can u make a similar video on Quasar?

Ответить
@minhthongvo5989
@minhthongvo5989 - 09.07.2021 05:04

Thank you so much for this video, it really help me to solve the problem in my project!!!!!

Ответить
@MaximM999
@MaximM999 - 30.08.2021 10:14

Firebase is easy, and it will not work in Safari, try implementing Apple push notifications xD

Ответить
@BaneZr994
@BaneZr994 - 31.08.2021 16:55

Hello it seems that when i do yarn add firebase, i don't get a firebase route from which to import firebase, i can only install from firebase/app

Ответить
@hakanaki
@hakanaki - 24.10.2021 03:28

How do you programmatically send the notification. Say from the backend

Ответить
@juhisingh4442
@juhisingh4442 - 02.11.2021 06:07

it show error in firebase

Ответить
@easylearnfrench
@easylearnfrench - 11.12.2021 22:42

it is not working for me. console log show me error

Ответить
@easylearnfrench
@easylearnfrench - 12.12.2021 16:53

can anybody helps me with the code? I did the same but it catches error
import React, { Component } from "react";
import firebase from "./firebase";

export default class App extends Component {
constructor(props) {
super(props);
this.state = {};
}

componentDidMount() {
const messaging = firebase.messaging();
messaging
.requestPermission()
.then(() => {
return messaging.getToken();
})
.then((token) => {
console.warn("Token : ", token);
})
.catch(() => {
console.log("Error");
});
}
render() {
return <div>this is my first fcm notification.</div>;
}
}

Ответить
@tvkiduniya6685
@tvkiduniya6685 - 04.01.2022 17:51

Will this code work for react native?

Ответить
@poopin8064
@poopin8064 - 10.02.2022 15:20

Notifications are not coming to my website

Ответить
@anupkaushik9370
@anupkaushik9370 - 05.03.2022 10:30

Is this notification popups every time the user browse the website ?

Ответить
@anupkaushik9370
@anupkaushik9370 - 05.03.2022 10:41

Source code URL is fake

Ответить
@Hugomarangao-td8ep
@Hugomarangao-td8ep - 31.05.2023 11:12

Thank you so much for this video, it really help me to solve the problem in my project!!!!!

Ответить
@Hugomarangao-td8ep
@Hugomarangao-td8ep - 01.06.2023 17:50

The notifications are arriving correctly but when you click on them instead of opening my site it opens a blanck page how do I solve this?

Ответить
@kshitijverma332
@kshitijverma332 - 09.06.2023 17:01

How do I get a notification when a change happens in Firestore?

Ответить
@react.dev.28
@react.dev.28 - 26.09.2023 10:24

source code ?

Ответить