OneSignal / react-onesignal

React OneSignal Module: Make it easy to integrate OneSignal with your React App!
Other
74 stars 23 forks source link

Provide onesignalId within the user namespace #142

Open ElwynVdb opened 2 months ago

ElwynVdb commented 2 months ago

Overview

This pull request provides a getter function for onesignalId in the User namespace

Benefits

veewee commented 1 month ago

@jkasten2 / @rgomezp

To give some context : this is what one currently needs to use in order to get the onesignal ID:

const oneSignalId = (window.OneSignal?.User as any)._currentUser.onesignalId;

Having to grab it from _currentUser doesn't seem like the way to go here.

Would this be something you are interested in merging? Let us know if we can do anything to help you getting this into this repository.