Clear profiling data for root when the root is unmounted
bvaughn opened this issue · 0 comments
bvaughn commented
See PR #230
We currently only reset profiling data when profiling is re-started (in onProfilingStatus
)
react-devtools-experimental/src/devtools/store.js
Lines 965 to 972 in c28acc5
We should probably also clear it out if the root it corresponds to gets unmounted.
This should be easy for _profilingOperations
and _profilingSnapshot
since they are just maps of root ID to data.
However, I think _profilingScreenshots
is actually currently broken because it maps commit index to screenshot, rather than root id to commit index to screenshot. So we should fix that too!
A basic test or two that verifies this would be nicer. 😄