useEffect调用列表的主表数据,如。国家和地点。我使用的是空的依赖列表,这样它只会在挂载后加载。但是错误显示清理没有正确完成,从而导致内存泄漏。 这是我在控制台中看到的错误。Warning: Can't perform a React state update on an unmounted component.中的清理函数 CorporateBasicProfileSection React.useEffect(() => {
import React from "react"import { useCollection } from"react-firebase-hooks/firestore"
import { db } from "../..但是,上面的代码返回一个错误,说明使用无效数据调用了“where”,因为useSession(