I have a React component and I want to load in my JSON data from a file. The console log currently doesn\'t work, even though I\'m creating the variable data
The simplest and most effective way to make a file available to your component is this:
var data = require('json!./data.json');
Note the json! before the path
json!