Created
December 8, 2017 16:00
-
-
Save nicholasess/84335a8aec9c6e0f1161a9e4605b7f40 to your computer and use it in GitHub Desktop.
example
This file contains hidden or 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
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