I'm having an issue instantiating react-native to then use its list view.
var ReactNative = require('react-native');
var MyClass = React.createClass({
...
render: function(){
...
);
}
}
We have the following inside of react-native-implementation.js
...
get AccessibilityInfo() { return require('AccessibilityInfo'); },
get ActivityIndicator() { return require('ActivityIndicator'); },
get ART() { return require('ReactNativeART'); },
...
It has about 90 of those get statements. When webpack runs, it errors out on every single one of them. Webpack brings up the following error for the first get, and the name corresponds for the rest (AccessibilityInfo, then ActivityIndicator, then ReactNativeART, etc.).
ERROR in C:/Directory/~/react-native/Libraries/react-native/react-native-implementation.js
Module not found: Error: Can't resolve 'AccessibilityInfo' in 'C:\Directory\node_modules\react-native\Libraries\react-native' @ C:/Directory/~/react-native/Libraries/react-native/react-native-implementation.js 31:35-63 @ ./Directory/MyClass.jsx
Where are all of these gets and there corresponding NPM installs coming from? I don't have them installed, but I can't do npm install AccessibilityInfo. So what am I missing?
Furthemore, what is the difference from the following via facebook's github.io:
import { AppRegistry, ListView, Text, View } from 'react-native';
vs
var ReactNative = require('react-native');
I'm assuming that I'm about to pull everything from React-Native instead of just the listview. Is there a better syntax when using var to get ListView? Would I be able do something like the following ( I currently can't test this because of the previous error):?
var {ListView} require('react-native');