我创建了一个反应原生项目。
我的依赖关系是:
"dependencies": {
"events": "^1.1.1",
"history": "^4.7.2",
"parse": "^1.10.0",
"react": "16.0.0",
"react-native": "^0.48.4",
"react-native-splash-screen": "^3.0.1",
"react-redux": "^5.0.6",
"react-router-native": "^4.2.0",
"react-router-redux": "^5.0.0-alpha.6",
"redux": "^3.7.2",
"redux-persist": "^4.10.1",
"redux-thunk": "^2.2.0",
"timers": "^0.1.1"
}
所以基本上当我尝试配置Parse连接时,我在componentWillMount()上的App.js上做了,就像这样:
componentWillMount(){ Parse.initialize("AppId","JSKey"); Parse.serverURL = 'http://parseServer:1337/parse' }
在Parse.intialize之前一切正常,但在尝试设置serverURL时,我收到此错误:
https://api.parse.com/1 is not a function (evaluating '_reactNative3.default.serverURL('http://parseServer:1337/parse')') componentWillMount