So I'm trying to destroy the animation in my react app but it is not destroying if I use any event listener I get the errors I don't know why, here is the code
import React, { Component } from 'react';
import './Cool.css';
import data from './data.json';
import ReactBodymovin from 'react-bodymovin';
class AventadorPage extends Component {
render() {
var bodymovinOptions = {
loop: 2,
autoplay: true,
prerender: true,
animationData: data,
}
return (
<div id="main-container">
<div className="animation">
<ReactBodymovin options={bodymovinOptions} />
</div>
</div>
);
}
}
export default AventadorPage;