I'm using @lottiefiles/dotlottie-react
in my project to show .lottie
files but when I pass loop={true}
to DotLottieReact
it cause below error :
This error only when I'm using .lottie
files occures but when I replace it with .json
file the error does not occur but I should use .lottie
format only.
How can I fix this error?
I'm using @lottiefiles/dotlottie-react
in my project to show .lottie
files but when I pass loop={true}
to DotLottieReact
it cause below error :
This error only when I'm using .lottie
files occures but when I replace it with .json
file the error does not occur but I should use .lottie
format only.
How can I fix this error?
1 Answer
Reset to default 0React Strict Mode can lead to extra renders or warnings that might not be handled well by certain libraries.
Solution: Try removing <React.StrictMode> in your main entry file to see if it resolves the issue.
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.createRoot(document.getElementById('root')).render(
// Remove <React.StrictMode> for testing purposes
<App />
);