{"size": 957, "ext": "js", "max_stars_repo_path": "app/components/hourly_forecast.js", "max_stars_repo_name": "nickming/ReactWeather", "max_stars_repo_stars_event_min_datetime": "2017-05-24T09:27:57.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-08T09:54:31.000Z", "max_issues_repo_path": "app/components/hourly_forecast.js", "max_issues_repo_name": "nickming/ReactWeather", "max_issues_repo_issues_event_min_datetime": "2017-05-27T06:05:19.000Z", "max_issues_repo_issues_event_max_datetime": "2017-07-20T12:06:10.000Z", "max_forks_repo_path": "app/components/hourly_forecast.js", "max_forks_repo_name": "nickming/ReactWeather", "max_forks_repo_forks_event_min_datetime": "2017-05-26T09:34:08.000Z", "max_forks_repo_forks_event_max_datetime": "2019-09-02T07:04:32.000Z"}
{"max_stars_count": 71, "max_issues_count": 3, "max_forks_count": 13, "avg_line_length": 22.7857142857, "max_line_length": 69, "alphanum_fraction": 0.5726227795}
/**
 * Created by nickming on 2017/5/13.
 */
'use strict';
import React, {Component} from 'react';
import {StyleSheet, View, Text, Image, ListView} from 'react-native';
import HourlyItem from './hourly_item';
import {observer} from 'mobx-react/native'
import weatherStore from '../stores/weather_store';

@observer
export default class HourlyForecast extends Component {
    // 构造
    constructor(props) {
        super(props);
        // 初始状态
        this.state = {};
    }

    _renderListView = () => {
        return (
            <ListView
                showsHorizontalScrollIndicator={false}
                horizontal={true}
                dataSource={weatherStore.hourlyDataSource}
                renderRow={this._renderItemView}>
            </ListView>
        )
    }

    _renderItemView = (item) => {
        return (
            <HourlyItem itemData={item}/>
        )
    }

    render() {
        return this._renderListView();
    }

}
