Last active
November 11, 2017 16:47
-
-
Save greim/5d7871cb134c71f69a76ee8ca39b6218 to your computer and use it in GitHub Desktop.
Fetch Logic 2
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
function ProductDetailPage({ viewportWidth, relatedProductInfo }) { | |
const hasRealestate = viewportWidth > 800; | |
const hasData = relatedProductInfo === undefined; | |
return <div> | |
... | |
{ hasRealestate && | |
( hasData | |
? <RelatedProducts products={relatedProducts}/> | |
: <div data-vacancy={`relatedProducts/${id}`}>Loading...</div> | |
) | |
} | |
</div>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment