mirror of
https://github.com/bendtherules/buildit-weather-app.git
synced 2026-08-19 00:31:16 +00:00
Add SingleDayForecast
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user