Skip to content

Instantly share code, notes, and snippets.

@rjpcasalino
Created April 2, 2020 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjpcasalino/e9f2d0644c2e7e82392c7f096ddc9025 to your computer and use it in GitHub Desktop.
Save rjpcasalino/e9f2d0644c2e7e82392c7f096ddc9025 to your computer and use it in GitHub Desktop.
render() {
if (this.state.forecast.name != undefined) {
return e('div', null, null,
e('br'),
e('small', null, `${this.state.forecast.name}`),
e('br'),
e('small', null, `${this.state.forecast.shortForecast}`),
e('br'),
e('small', null, `${this.state.forecast.temperature}`),
e('small', {dangerouslySetInnerHTML: {
__html: '°'}}, null),
e('small', null, `${this.state.forecast.temperatureUnit}`),
e('br'),
e('small', null,
`${this.state.forecast.windSpeed} ${this.state.forecast.windDirection}`
),
e('br'),
//e('img', {src: this.state.forecast.icon, id: 'weather-api-icon' }),
);
}
return e('div', null, "Fetching...");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment