This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Follow this instructions to get stated with OneSignal.
In your ReactJS project folder, navigate to the public folder and open the index.html file. Inside of the head HTML tag, paste the code you previously copied from the OneSignal page. The code should look like this:
<script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async=""></script>
<script>
window.OneSignal = window.OneSignal || [];
OneSignal.push(function () {
OneSignal.init({
appId: "YOUR-APP-ID",
});
});
</script>
Note: For advanced setup of OneSignal with ReactJS, reference the main branch.