Skip to content

Commit

Permalink
Prevent unmounted state update warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Mar 18, 2021
1 parent 9dfd7b8 commit e630cca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ui/components/SecondaryToolbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ThreadFront.getAnnotations(({ annotations }) => {
});

let currentTime = null;
let rerenderComponentsTab;
let rerenderComponentsTab = null;

ThreadFront.on("paused", data => {
if (currentTime === data.time) {
Expand Down Expand Up @@ -158,6 +158,10 @@ function Components() {
setCount(count+1);
};

React.useLayoutEffect(() => () => {
rerenderComponentsTab = null;
});

return (
<DevTools
bridge={bridge}
Expand Down

0 comments on commit e630cca

Please sign in to comment.