Skip to content

Commit 25670f1

Browse files
committed
chore: update readme
1 parent eaca27b commit 25670f1

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,37 @@ This fast-image fork comes with a few more features:
7272
- [x] Antialiasing for borderRadius on Android
7373
- [x] A bit faster re-renders
7474

75-
## Usage
75+
## Installation
7676

7777
**Note: You must be using React Native 0.60.0 or higher to use the most recent version of `react-native-fast-image`.**
7878

7979
```bash
80-
npm i @cuvent/react-native-fast-image
80+
yarn add @cuvent/react-native-fast-image
81+
// OR: npm i @cuvent/react-native-fast-image
82+
```
83+
84+
### Extra step for android
85+
86+
For ETag caching to work we need to persist the ETag with the urls. For that we use ObjectBox.
87+
To enable ObjectBox add the following to your `MainApplication.java`:
88+
89+
```java
90+
import com.dylanvann.fastimage.custom.persistence.ObjectBox;
91+
// ...
92+
93+
public class MainApplication extends Application implements ReactApplication {
94+
@Override
95+
public void onCreate() {
96+
super.onCreate();
97+
ObjectBox.init(this); // <- ⚠️ Add this
98+
}
99+
100+
// ...
101+
}
81102
```
82103

104+
## Usage
105+
83106
```jsx
84107
import FastImage from '@cuvent/react-native-fast-image'
85108

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cuvent/react-native-fast-image",
3-
"version": "8.5.14",
3+
"version": "8.5.15",
44
"description": "🚩 FastImage, performant React Native image component. Cuvent fork.",
55
"keywords": [
66
"cache",

0 commit comments

Comments
 (0)