-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
I use [email protected], [email protected] and [email protected].
But sometimes, useResizeDetector behaves like this when the route changes.
Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.
My code is below.
const chartElemRef = useRef<HTMLDivElement>();
useResizeDetector({
handleWidth: true,
handleHeight: false,
targetRef: chartElemRef,
});
Metadata
Metadata
Assignees
Labels
No labels