const [loading, setLoading] = useState(true); console.log("useEffect TopTen has been called!")here I'm using other effects also for fetching data
const [data, setData] =
代码: // listen to mouse clicking outside of autocomplete or input document.addEventListener但是,当我尝试访问通过react-redux connect传递的mousedown事件的props时,它们都是空的。但是,从父组件传递的属性是存在的。我已经确认,在初始渲染时,react-redux connect道具如预期的那样存在。我认为mousedown事件可能与此有关,所以我测试了使用以下