You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
控制台:
Warning: Can't perform a React state update 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.
Environment
Info
antd
4.20.1
React
17.0.2
System
window
Browser
Chrome (Latest)
The text was updated successfully, but these errors were encountered:
No warning about setState on unmounted components: Previously, React warned about memory leaks when you call setState on an unmounted component. This warning was added for subscriptions, but people primarily run into it in scenarios where setting state is fine, and workarounds make the code worse. We've facebook/react#22114 this warning.
Reproduction link
Steps to reproduce
1.先点击Affix
2.然后点击Index
3.查看控制台
(1,2两步可能需多次尝试会出现)
What is expected?
希望没有警告
What is actually happening?
控制台:
Warning: Can't perform a React state update 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.
The text was updated successfully, but these errors were encountered: