This is an example from Google Adsense application page. The loading screen displayed before the main page showed after.
I don\'t know how to do the same th
The workaround for this is:
In your render function do something like this:
constructor() {
this.state = { isLoading: true }
}
componentDidMount() {
this.setState({isLoading: false})
}
render() {
return(
this.state.isLoading ? *showLoadingScreen* : *yourPage()*
)
}
Initialize isLoading as true in the constructor and false on componentDidMount