Skip to content

Instantly share code, notes, and snippets.

@nicholasess
Created December 8, 2017 16:00
Show Gist options
  • Save nicholasess/84335a8aec9c6e0f1161a9e4605b7f40 to your computer and use it in GitHub Desktop.
Save nicholasess/84335a8aec9c6e0f1161a9e4605b7f40 to your computer and use it in GitHub Desktop.
example
class App extends Component {
constructor(){
this.state = {loading: true}
}
componentWillMount(){
FCMToken(token){
this.setState({token: token, loading: false})
}
}
render(){
if(this.state.loading){
return null
}else{
return <WebView url={{url:`http://example.com?token=${this.state.token}`}}>
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment