Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 4aa243c

Browse files
authored
Add ES5 require instruction to README.md
1 parent cd6eb3c commit 4aa243c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,22 @@ Beginning in Android 6.0 (API level 23), users grant permissions to apps while t
113113

114114
## Recipes
115115

116+
ES6
117+
118+
The module uses ES6 style export statement, simply use `import` to load the module.
119+
116120
```js
117121
import RNFetchBlob from 'react-native-fetch-blob'
118122
```
123+
124+
ES5
125+
126+
If you're using ES5 require statement to load the module, please add `default`. See [here](https://github.com/wkh237/react-native-fetch-blob/wiki/Trouble-Shooting#rnfetchblobfetch-is-not-a-function) for more detail.
127+
128+
```
129+
var RNFetchBlob = require('react-native-fetch-blob').default
130+
```
131+
119132
#### Download example : Fetch files that needs authorization token
120133

121134
```js

0 commit comments

Comments
 (0)