离子 5、反应、电容器、fetchFirestoreCollection 错误

问题描述

我正在尝试使用 fetchFirestoreCollection 来检索一个集合,并继续得到“未找到集合”,所以看起来 .ts 文件中的某些内容可能已关闭?我可以成功登录该应用程序,但无法从 Firestore 中检索。提前致谢!

代码如下;

 var filters = [
        ['where','type','==','news','string']
    ];

// @ts-ignore
    const fetchHome = async() => {
        // @ts-ignore
        await FirebaseX.fetchFirestoreCollection('home',function(documents){
            // @ts-ignore
                setEntries(JSON.stringify(documents));
            console.log("Successfully fetched collection: "+JSON.stringify(documents));
        },// @ts-ignore
            function(error: string){
                // @ts-ignore
            console.error("Error fetching document: "+error);
        });
    }
    useEffect(() => {

        fetchHome().then(r => {});
        console.log('entries: ',entries);
    },[]);

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)