-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Very nice plugin.
I am rotating the cube with interval. following is my code:
useEffect(() => {
let interval;
if (props.autoRotateInterval)
interval = setInterval(() => {
if (carouselRef != null && carouselRef.current != null && isMounted) {
carouselRef.current.next();
}
}, props.autoRotateInterval);
return () => {
carouselRef.current = null;
clearInterval(interval);
};
}, []);
I am getting the following warning:
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in Motion (created by Carousel)
in div (created by Carousel)
I think Carousel is setting state without checking if it has been mounted or not.
Metadata
Metadata
Assignees
Labels
No labels