Open timbrownsf opened 2 years ago
Howdy, Thanks for your patience.
I think you make an excellent point. Before making a decision, we would have to carefully consider the switch. That said, I can't think of a reason this cannot be done at the moment. However, note that we would not be able to remove this until a future major release.
If you could provide us with more info as to why this is important to you and how you are using the package, it may help guide us in our efforts.
Internal note: Related context: https://github.com/OneSignal/react-onesignal/pull/59
This is important if someone tries to send data to OneSignal before the handleOnLoad method has been invoked
@timbrownsf , I see. Are you trying to do something like set user data tags?
How can we help?
Init doesnt look like it needs to be async. It would be nice if it wasnt - most 3rd party trackers arent. Also, the window["OneSignal"] property seems to only be instantiated inside of the handleOnLoad method (which is called after the script is loaded). Shouldnt the property and queue be initialized immediately during init/module import vs when the script asynchronously returns?
Thank you!