Last active
April 24, 2024 20:05
-
-
Save iAmWillShepherd/99f2ee158ffddf860405e330b6f7a4aa to your computer and use it in GitHub Desktop.
Code snippet for initializing OneSignal in React Native
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import { APP_ID } from '@env'; | |
import { OneSignal} from 'react-native-onesignal'; | |
class OS extends React.Component<Props, State> { | |
constructor(props: Props) { | |
super(props); | |
this.state = { }; | |
} | |
async componentDidMount() { | |
OneSignal.initialize(APP_ID); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment