I want to increase the speed of Lottie animation in react but it didn’t work. This is my code
import React, { useMemo } from 'react';
import Lottie from 'react-lottie';
import animationData from './Lottie_meregala.json';
const ConfettiAnimation = () => {
const speed = 2;
// Optimized defaultOptions using useMemo to avoid unnecessary updates
const defaultOptions = useMemo(() => ({
loop: false,
autoplay: true,
animationData: animationData,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}), []);
return (
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'flex-end', height: '100vh' }}>
<Lottie options={defaultOptions} height={400} width={400} speed={speed} />
00 </div>
);
};
export default ConfettiAnimation;
I want to increase the speed of this confetti animation but it didn’t work me please help me