Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Konva 库有一个有用的性能优化列表。我正在使用 react-konva 编写一个应用程序,并且想特别知道在卸载组件以防止内存泄漏时是否有任何工作要做。我是否需要销毁()任何 konva 元素进行清理?
您无需担心react-konva. 它会自动处理添加/销毁形状。
react-konva
您只需在以下情况下应用链接中的规则:
Konva.Tween
如果你只是用render()函数以“反应方式”渲染形状,你会没事的。
render()