Skip to content

Instantly share code, notes, and snippets.

@njwest
Created March 24, 2018 13:39
Show Gist options
  • Save njwest/8505d76353cb9e18627c393677184ef4 to your computer and use it in GitHub Desktop.
Save njwest/8505d76353cb9e18627c393677184ef4 to your computer and use it in GitHub Desktop.
src/App.js final render
# App.js render method
render() {
if (this.state.loading) {
return (
<Loading size={'large'} />
);
} else if (!this.state.jwt) {
return (
<Auth newJWT={this.newJWT} />
);
} else if (this.state.jwt) {
return (
<LoggedIn deleteJWT={this.deleteJWT} />
);
}
}
# snip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment