Is there any way to pass a React component to Push notification using service worker and node js?

42
November 21, 2020, at 9:20 PM

I am looking for a solution where I can pass a react component (let's take a modal component) to the push notification parameter using service worker and node js. My service worker code for normal push notification code is-

self.addEventListener("push", function(event) {
        const options = {
        body: "Kousik Sen",
        body: " +91-xxxxxxxxxx",
        icon:
            "https://png.pngtree.com/png-vector/20190710/ourmid/pngtree-user-vector-avatar-png-image_1541962.jpg",
        dir: "ltr",
        data: {
            url: "http://localhost:8080/#/"
        }
    };
    event.waitUntil(
        // Retrieve a list of the clients of this service worker.
        self.registration.showNotification("Incoming Call", options)
    );
});
READ ALSO
In PDFMake I set the height and weight of table, but it isn't work

In PDFMake I set the height and weight of table, but it isn't work

I've created tables with pdfmakeThe pagesize and the columns size was fixed

31
Get Firebase token from external API in my test cases

Get Firebase token from external API in my test cases

I have written custom nodejs authentication utilising the firebase token based auth module

43
env variables set from the code are not available in imported modules in node.js

env variables set from the code are not available in imported modules in node.js

How to set environment variables in the code so they are available in imported NPM modules?

49
Is there any way to cache the API response in VueJS

Is there any way to cache the API response in VueJS

In our VueJS application, we are having few API's which are calling each and every time whenever the page reloadsIn those API's

33