Skip to content

Instantly share code, notes, and snippets.

@jbaxleyiii
Created July 19, 2017 02:57
Show Gist options
  • Save jbaxleyiii/6e8a333c53dca89c49d31c49ebeac644 to your computer and use it in GitHub Desktop.
Save jbaxleyiii/6e8a333c53dca89c49d31c49ebeac644 to your computer and use it in GitHub Desktop.
export default withCharacter(({ loading, hero, error }) => {
// Operator '>' cannot be applied to types 'boolean' and 'number'.
if (loading > 1) return <div>Loading</div>;
if (error) return <h1>error.name</h1>;
return ...;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment