react-lottie icon indicating copy to clipboard operation
react-lottie copied to clipboard

Destroy Lottie on 'complete' event.

Open Skagoo opened this issue 6 years ago • 0 comments

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?

Skagoo avatar Apr 04 '19 13:04 Skagoo