<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          react-native-refreshable-listview下拉刷新組件

          聯(lián)合創(chuàng)作 · 2023-09-25 18:16

          react-native-refreshable-listview 是下拉刷新 ListView,當數(shù)據(jù)重載的時候顯示加載提示。

          React Native Hacker News

          代碼示例:

          var React = require('react-native')
          var {Text, View, ListView} = React
          var ArticleStore = require('../stores/ArticleStore')
          var StoreWatchMixin = require('./StoreWatchMixin')
          var ArticleView = require('./ArticleView')
          var RefreshableListView = require('./RefreshableListView')
          var ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1.id !== r2.id})
          var ArticlesScreen = React.createClass({
            mixins: [StoreWatchMixin],
            getInitialState() {
              return {dataSource: ds.cloneWithRows(ArticleStore.all())}
            },
            getStoreWatches() {
              this.watchStore(ArticleStore, () => {
                this.setState({dataSource: ds.cloneWithRows(ArticleStore.all())})
              })
            },
            reloadArticles() {
              return ArticleStore.reload() // returns a promise of reload completion
            },
            renderArticle(article) {
              return <ArticleView article={article} />
            },
            render() {
              return (
                <RefreshableListView
                  dataSource={this.state.dataSource}
                  renderRow={this.renderArticle}
                  loadData={this.reloadArticles}
                  refreshDescription="Refreshing articles"
                />
              )
            }
          })
          瀏覽 23
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  欧美啪啪视频 | aaa国产免费 | 自拍偷拍成人视频 | 成人免费版 欧美州 | 国产视频国产区 |