You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -9,18 +8,36 @@ Lottie is a mobile library for Android and iOS that parses [Adobe After Effects]
9
8
10
9
For the first time, designers can create **and ship** beautiful animations without an engineer painstakingly recreating it by hand.
11
10
12
-
# Getting Started
11
+
##Getting Started
13
12
14
13
Get started with Lottie by installing the node module with yarn or npm:
15
14
16
15
```
17
16
yarn add lottie-react-native
18
17
```
18
+
19
19
or
20
+
20
21
```
21
22
npm i --save lottie-react-native
22
23
```
23
24
25
+
**_ IMPORTANT _**
26
+
27
+
Apps using older versions of React Native **_(RN < 0.59)_** should use `lottie-react-native`**_2.5.11_** due to AndroidX support being introduced only by React Native 0.59.
28
+
29
+
Therefore, any app running on RN <= 0.58.4 has to install lottie as follows:
Use `react-native link` to add the library to your project:
@@ -40,15 +57,7 @@ For android, you can `react-native link` as well:
40
57
react-native link lottie-react-native
41
58
```
42
59
43
-
## React Native Version Note:
44
-
45
-
React Native 0.59 included several significant changes to support 64-bit Android. Those who are on react-native versions BELOW 0.59.0 should continue using lottie-react-native 2.5.11.
46
-
47
-
Those using react-native 0.59+ without AndroidX can use lottie-react-native 2.6.0, which includes backwards compatibility for older SDK versions that Lottie currently relies upon.
48
-
49
-
Those on 0.59+ wanting out of the box AndroidX support should follow [this issue](https://github.com/react-native-community/lottie-react-native/issues/443).
50
-
51
-
# Usage
60
+
## Usage
52
61
53
62
(If you are using TypeScript, please read [this first](/docs/typescript.md))
54
63
@@ -60,13 +69,7 @@ import LottieView from 'lottie-react-native';
You can find the full list of props and methods available in our [API document](https://github.com/airbnb/lottie-react-native/blob/master/docs/api.md). These are the most common ones:
134
137
135
-
| Prop | Description | Default |
136
-
|---|---|---|
137
-
|**`source`**|**Mandatory** - The source of animation. Can be referenced as a local asset by a string, or remotely with an object with a `uri` property, or it can be an actual JS object of an animation, obtained (for example) with something like `require('../path/to/animation.json')`. |*None*|
138
-
|**`style`**| Style attributes for the view, as expected in a standard [`View`](https://facebook.github.io/react-native/docs/layout-props.html). | The `aspectRatio` exported by Bodymovin will be set. Also the `width` if you haven't provided a `width` or `height`|
139
-
|**`loop`**| A boolean flag indicating whether or not the animation should loop. |`true`|
140
-
|**`autoPlay`**| A boolean flag indicating whether or not the animation should start automatically when mounted. This only affects the imperative API. |`false`|
|**`source`**|**Mandatory** - The source of animation. Can be referenced as a local asset by a string, or remotely with an object with a `uri` property, or it can be an actual JS object of an animation, obtained (for example) with something like `require('../path/to/animation.json')`. |_None_|
141
+
|**`style`**| Style attributes for the view, as expected in a standard [`View`](https://facebook.github.io/react-native/docs/layout-props.html).| The `aspectRatio` exported by Bodymovin will be set. Also the `width` if you haven't provided a `width` or `height`|
142
+
|**`loop`**| A boolean flag indicating whether or not the animation should loop. |`true`|
143
+
|**`autoPlay`**| A boolean flag indicating whether or not the animation should start automatically when mounted. This only affects the imperative API. |`false`|
0 commit comments