Check out example codes for "github lottie". It will help you in understanding the concepts better.

Code Example 1

lottie.loadAnimation({
  container: element, // the dom element that will contain the animation
  renderer: 'svg',
  loop: true,
  autoplay: true,
  path: 'data.json' // the path to the animation json
});

Learn ReactJs, React Native from akashmittal.com