Skip to content

Commit

Permalink
添加每日一学
Browse files Browse the repository at this point in the history
  • Loading branch information
crazycodeboy committed Aug 18, 2016
1 parent f0fa70a commit 83ca9bd
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions React Native 每日一学/React Native 每日一学.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

# Learn a little every day


```
模板
```



D1:React Native 读取本地的json文件 (2016-8-18)
------
自 React Native 0.4.3,你可以导入的形式,来读取本地的json文件,导入的文件可以作为一个js对象使用。

### 第一步:导入json文件

```JavaScript
var customData = require('./customData.json');
```

ES6/ES2015

```JavaScript
import customData from './customData.json';
```

### 第二步:使用



@[How to fetch data from local JSON file on react native?](http://stackoverflow.com/questions/29452822/how-to-fetch-data-from-local-json-file-on-react-native)

0 comments on commit 83ca9bd

Please sign in to comment.