Skip to content
Discussion options

You must be logged in to vote

This works

`import React from "react";
import { useLottie } from "lottie-react";
import lottie from "~/assets/empty.json";

const style = {
height: 300,
};

export default function EmptyLottie() {
const options = {
animationData: lottie,
loop: true,
autoplay: true,
};

const { View } = useLottie(options, style);

return

{View}
;
}
`

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@zeluizr
Comment options

Answer selected by mbkProgrammer
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants