Thread
1y ago
Manually call cleanup in React?
Hi there! Do I need to manually call rive.cleanup when a component dismounts in React? ie
const RiveComponent: React.FC = () => { const { rive, RiveComponent } = useRive({ src: RiveFile, autoplay: true, }) useEffect(() => { return () => rive?.cleanup() }, []) return <RiveComponent /> };
Or are the resources cleaned up automagically?
2 replies
1y ago
Author
1y ago
Thanks