我想删除我的React Native代码中的组件,就像JavaScript中的"el.parentNode.removeChild(el)"或Objective-C中的"[view removeFromSuperview]",但我没有在React中看到任何相关的API文档.有什么方法可以做到吗?
我正在使用导航器在页面之间导航.
当Navigator.push()方法被调用时,"componentWillUnmount"法不叫我们从导航页面上.
这有点问题,因为我想取消订阅听众等.
这是正常的行为吗?什么时候实际调用"componentWillUnmount"?
react-native ×2