OneSignal / react-onesignal

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

[Question]: Where or how is this example registering the service worker? #133

Closed windsywinds closed 9 months ago

windsywinds commented 9 months ago

This example does not appear to follow the example provided by OneSignal's website documentation.
Neither the head contains any script to register the service worker, nor the code in the App.tsx component contains any serviceWorkerPath line. The example contains arguments such as login or User, but these are not given on the website documentation as lines required for a working service.

Why does the example folder contain a complete react-app but the root folder has further files containing OneSignal code like index.ts? If this is related to the structure of the complete application then it's confusing as it's not a common way to structure a react app.

OneSignal guides, examples and overall documentation appear either outdated, incomplete or are just outright confusing and need updating with better information on minimum functional code to get operational for each platform.