Created
November 16, 2019 15:14
-
-
Save 01Clarian/f0ea51637e3eb441abbc7a7b042541ad to your computer and use it in GitHub Desktop.
Building Weathe.js Component
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
import React from 'react' | |
const Weather = ({description, city, country, error, temperature}) => { | |
return ( | |
<div> | |
{city && country && <p>{city}, {country}</p>} | |
{temperature && <p>{temperature}</p>} | |
{description && <p> {description}</p>} | |
{error && <p>{error}</p>} | |
</div> | |
) | |
} | |
export default Weather; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment