2.0.1 • Published 4 years ago

bs-lottie-react-native v2.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

bs-lottie-react-native

BuckleScript bindings for Lottie for React Native

npm (scoped)


Example

See packages/ReasonableLottie. It's the original lottie-react-native example recreated in ReasonML.

TL;DR

open ReactNative;

[@react.component]
let make = () => {
  <Lottie source=(Required(Packager.require("./animation.json"))) />
};

Installation

Setup your React Native project according to http://airbnb.io/lottie/react-native/react-native.html

Install this bindings with its peer dependencies

yarn add bs-lottie-react-native reason-react-native reason-react

Add bs-lottie-react-native (and "reaon-react-native", "reason-react" if they arent't there yet) to bs-dependencies in your bsconfig.json

{
  "bs-dependencies": [
    "reason-react",
    "reason-react-native",
    "bs-lottie-react-native"
  ]
}