mrded mrded - 9 months ago 1199
JSON Question

How to fetch data from local JSON file on react native?

How can I store local files such as JSON and then fetch the data from controller?


Since React Native 0.4.3 you can read your local JSON file like this:

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

and then access customData like a normal JS object.