Add SingleDayForecast

This commit is contained in:
2018-04-01 13:17:31 +05:30
parent 0cd6a25e2f
commit 6aca76ed03
3 changed files with 52 additions and 0 deletions
@@ -0,0 +1,30 @@
import * as React from 'react';
import './Component.css';
import { ForecaseAtInstance } from '../WeatherApp';
export interface SingleDayForecastProps {
forecastDay: Array<ForecaseAtInstance>;
}
export class SingleDayForecast extends React.Component<SingleDayForecastProps, {}> {
constructor(props: SingleDayForecastProps) {
super(props);
this.props = props;
// this.state = { data: undefined };
}
componentWillUpdate(nextProps: SingleDayForecastProps) {
this.props = this.props;
}
render() {
return (
<div className="SingleDayForecast">
{JSON.stringify(this.props)};
</div>
);
}
}