【发布时间】:2021-12-10 00:59:23
【问题描述】:
我在 NextJs/React 项目中使用 useCollectionData 钩子。我正在从我的 firestore 数据库中获取一些帖子,并且收到此错误 TypeError: v1.isEqual is not a function
这是我用来获取帖子的代码。
const [posts]: [Post[] | undefined, boolean, Error | undefined] =
useCollectionData<Post>(renderPosts, { idField: "id" });
【问题讨论】:
-
错误不在这部分
-
@ABDULLOKHMUKHAMMADJONOV 是正确的。请提供
v1.isEqual函数所在的完整代码。 -
该函数来自我正在使用的一个名为
react-fireabase-hooks的包
标签: typescript firebase google-cloud-firestore next.js