Warning: Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
为什么我仍然在未挂载组件中设置状态时出错?在错误跟踪中,它指向foo()中的foo()。我清除异步计时器,并在执行api调用
今天,我试图创建一个新的反应应用程序后,我休息了很长时间。当我尝试npx create-react-app时,它给了我以下错误:
You are running `create-react-app` 4.0.3, which is behind the latestWe no longer support global installation of Create ReactApp.- yarn global remove create-react-