📌  相关文章
📜  flatlist onrefresh react native - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:16.391000             🧑  作者: Mango

代码示例2
const [isFetching, setIsFetching] = useState(false);

const fetchData = () => {
  dispatch(getAllDataAction(userParamData));
  setIsFetching(false);
};

const onRefresh = () => {
  setIsFetching(true);
  fetchData();
};

 item.id.toString()}
  renderItem={renderItem}
  onRefresh={onRefresh}
  refreshing={isFetching}
  progressViewOffset={100}
  ListEmptyComponent={}
/>;