Adding instructions to manually link.

This commit is contained in:
Jeffery Bennett 2018-04-05 13:18:28 -05:00
parent 3bcb02219c
commit 71a52d9ba7
1 changed files with 44 additions and 1 deletions

View File

@ -40,13 +40,56 @@ and
- [x] GIF support.
- [x] Border radius.
## Usage
## Installation (automatic linking)
```bash
yarn add react-native-fast-image
react-native link
```
## Installation (manual linking)
```bash
yarn add react-native-fast-image
```
*MainApplication.java*
Add `new FastImageViewPackage()` into the _getPackages_ method.
```java
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new FastImageViewPackage(),
```
*build.gradle*
Add `compile project(':react-native-fast-image')` into the dependencies block.
```
dependencies {
compile project(':react-native-fast-image')
```
*settings.gradle*
Add the following to the bottom of the document.
```
include ':react-native-fast-image'
project(':react-native-fast-image').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fast-image/android')
```
*Podfile*
Add the following under the :subspecs array:
```
pod 'react-native-fast-image', :path => '../node_modules/react-native-fast-image'
```
## Usage
```js
import FastImage from 'react-native-fast-image'