title: React Native - How to initialize OneSignal in a stateless function component?
body: <p>I've read OneSignal installation here: <a href="https://documentation.onesignal.com/docs/react-native-sdk-setup#step-5---initialize-the-onesignal-sdk" rel="nofollow noreferrer">https://documentation.onesignal.com/docs/react-native-sdk-setup#step-5---initialize-the-onesignal-sdk</a>. The documentation is written in a component class style.</p>
  <p>How to add the OneSignal in the stateless function component on React Native app?</p>
  <p>I've tried using useEffect but OneSignal still can't detect my app.</p>
  <p>Thanks.</p>