Issues Getting Started with Lottie in React Native

Richard Baldwin's Technical Blog

Issues Getting Started with Lottie in React Native

React Native Lottie Repository on Github

Issues Getting Started with Lottie in React Native

The promise of Lottie is almost too good to be true: beautiful animations requiring 1/6th the normal processing oomph. What’s not to love?

I’d suggested using Lottie in a project at work, but we ended up resorting to plain old gifs instead because the iOS dev was ______. Anywho, not gonna speculate about what exactly the iOS dev was thinking.

I wanted to try Lottie out myself so I set to work following the standard instructions in Github.

The first time I encountered a difficult issue: I couldn’t get the animation to load at all. No error, no disruption to surrounding text or images. No nada. It just wasn’t showing up.

It was frustrating, but I was intrigued. But I also had a deadline, so I got distracted and put Lottie aside for a few weeks.

Finally ready to try again, I realized the issue when I’d remembered another similar error with displaying images from external sources… the height and width must be defined. For giggles I added inline styles of height and width at 150 and voilá!