admin管理员组文章数量:1393302
I am using LottieFiles in React v18, vite v4. In public I keep a .lottie
file which I am loading with <DotLottieReact/>
. Sometimes animation can't load. In console I have message: Uncaught DOMException: Index or size is negative or greater than the allowed amount
.
How can I solve it?
What is the problem?
//Animation.jsx
import React from 'react';
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
export const Animation = ({url="path/to/animation.lottie"}) => {
return (
<DotLottieReact
src={url}
loop
autoplay
/>
);
};
//SecondSection.jsx
<div>
<Animation url="./crown.lottie"/>
</div>
本文标签: javascriptLottieFilesDotLottieReact lottie not loadingStack Overflow
版权声明:本文标题:javascript - LottieFiles - DotLottieReact .lottie not loading - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744613458a2615792.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论