Last active
January 14, 2016 22:49
-
-
Save rt2zz/1e9e0216b8b44b400df8 to your computer and use it in GitHub Desktop.
delay render
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
export default class App extends Component { | |
state = {initialized: false} | |
componentWillMount () { | |
persistStore(store, config, () => { | |
this.setState({initialized: true}) | |
}) | |
} | |
render () { | |
if (!this.state.initialized) return <Loading /> | |
else return <MyApp /> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment