Access to webpushr functions in React?

Hello,

I’m trying to figure out how to get access to and use webpushr functions in React components, for example I want to save a users sid to my database using…

function _webpushrScriptReady(){
    webpushr('fetch_id',function (sid) { 
        //save id to database
        console.log('webpushr subscriber id: ' + sid)
    });

Could someone please point me in the right direction, thank you.

try window.webpushr …

Yes that works, I’m so used to React I forget things like this, thanks!!