【发布时间】:2020-01-16 09:57:57
【问题描述】:
我不知道我为什么会遇到这个问题。如果有人知道如何处理它,请提供帮助。提前致谢
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 %s.%s, the componentWillUnmount method,
in ToastContainer (at connectStyle.js:392)
in Styled(ToastContainer) (at Root.js:16)
in RCTView (at View.js:45)
in View (at Root.js:14)
in Root (at connectStyle.js:392)
in Styled(Root) (at LoginScreen.js:93)
in LoginScreen (at SceneView.js:9)
in SceneView (at StackViewLayout.tsx:889)
in RCTView (at View.js:45)
in View (at StackViewLayout.tsx:888)
in RCTView (at View.js:45)
in View (at StackViewLayout.tsx:887)
in RCTView (at View.js:45)
in View (at createAnimatedComponent.js:151)
in AnimatedComponent (at StackViewCard.tsx:106)
in RCTView (at View.js:45)
in View (at createAnimatedComponent.js:151)
in AnimatedComponent (at screens.native.js:71)
in Screen (at StackViewCard.tsx:93)
in Card (at createPointerEventsContainer.tsx:95)
in Container (at StackViewLayout.tsx:975)
- node_modules\react-native\Libraries\YellowBox\YellowBox.js:59:8 in error
- node_modules\expo\build\environment\muteWarnings.fx.js:27:24 in error
- ... 12 more stack frames from framework internals
【问题讨论】:
-
请分享代码
-
检查这个stackoverflow.com/questions/53949393/…..请检查这个答案
-
我从 componentDidmount @sinafarhadi 中的 API 获取数据
标签: javascript reactjs typescript react-native setstate