有人能找出这段代码中有什么问题吗?从 flatlist 中什么也没得到。状态变量 items 也显示为 null。import React, { useEffect, useState } from 'react';import { FlatList, SafeAreaView, TextInput, Text, Button, Alert } from 'react-native';import
2022-02-14
我有一个组件,需要依次执行几个查询。我使用了承诺,但似乎不起作用/我无法这样做。这是我的组件的一部分:export default function AuthWrapper() {useEffect(() => {// creating app_tokens table if not existconsole.log('before first query');new Promise((resol
2020-12-01
this.getDetails();getDetails = () => {let userDetails = [];db.transaction((tx) => {tx.executeSql('select * from users where role=?',['students'],(tx,results) => {let details = []if(results.rows.length
2021-01-21