mrded mrded - 2 years ago 2013
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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download