Skip to content

Instantly share code, notes, and snippets.

@rt2zz
Last active January 14, 2016 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rt2zz/1e9e0216b8b44b400df8 to your computer and use it in GitHub Desktop.
Save rt2zz/1e9e0216b8b44b400df8 to your computer and use it in GitHub Desktop.
delay render
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