2
當我嘗試ReactNative版本0.44.0它適用於iOS獲取數據,但得到Android上的此錯誤消息:陣營本地#Networking.sendRequest拿到9個參數,預期中的8
Networking.sendRequest got 9 arguments, expected 8
兩個代碼iOS和Android是:
componentDidMount() {
return fetch('https://facebook.github.io/react-native/movies.json')
.then((response) => response.json())
.then((responseJson) => {
return responseJson.movies;
})
.catch((error) => {
console.error(error);
});
};
我不認爲你應該把裏面的'componentDidMount'一回嘗試刪除它,看看它是否有差別 – Raymond
我刪除'componentDidMount一切迴歸'但我得到相同的錯誤信息。 –