0

对于 ReactJS 的测试工具类:TestUtils,它们是如何处理垃圾回收的?没有方法可以取消分配或销毁预先在 renderIntoDocument 方法中创建的 React 模块

这是源链接 https://github.com/facebook/react/blob/87bcbff21896e6b362012a0bc82c35d42a6f955d/src/test/ReactTestUtils.js

为清楚起见 TestUtils.renderIntoDocument(); 将初始化数据,但我如何卸载此组件或完全删除此组件?

先感谢您。

4

0 回答 0