Created
January 6, 2020 22:56
-
-
Save BetterProgramming/2013a9b7335b0d3d8253fffddc773229 to your computer and use it in GitHub Desktop.
This file contains 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
... | |
let content = <div>No Data</div>; | |
if (coinData && coinData.prices && coinData.prices.length > 0) | |
content = <div>Data</div>; | |
if (isLoading) content = <div>Loading</div>; | |
if (error) content = <div>{error}</div>; | |
return ( | |
<div className="App"> | |
<h1 className="title">Bitcoin</h1> | |
{content} | |
</div> | |
); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment