Skip to content

Commit

Permalink
fix: πŸ› fixes memory leak
Browse files Browse the repository at this point in the history
βœ… Closes: #426, #419
  • Loading branch information
prc5 committed Oct 13, 2023
1 parent c0871e2 commit 0173d7c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/transform-wrapper/transform-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export const TransformWrapper = React.forwardRef(

useEffect(() => {
instance.update(props);
return () => {
instance.cleanupWindowEvents();
};
}, [instance, props]);

return <Context.Provider value={instance}>{content}</Context.Provider>;
Expand Down

0 comments on commit 0173d7c

Please sign in to comment.