Skip to content

Commit

Permalink
Update auto-height example to disconnect ResizeObserver when unmounted (
Browse files Browse the repository at this point in the history
  • Loading branch information
PrettyCoffee authored Aug 9, 2023
1 parent a44787a commit 488d615
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/auto-height.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const AutoHeight = ({ children, ...props }) => {
});

resizeObserver.observe(contentDiv.current);

return () => resizeObserver.disconnect()
}, []);

return (
Expand Down

0 comments on commit 488d615

Please sign in to comment.