Destroy Lottie on 'complete' event.
Skagoo opened this issue · 0 comments
Skagoo commented
I'm having issue's on destroying Lottie, it doesn't seem to be as straightforward as it is in lottie-web.
This is my Lottie with eventlistener.
const eventListeners: EventListener[] = [
{
eventName: 'complete',
callback: () => (event.target as unknown as Lottie).destroy()
}
]
<Lottie options={introOptions} speed={1} isClickToPauseDisabled={true} eventListeners={eventListeners} />
Any idea on how I can achieve this?