最近在学习Facebook的React Native:官网上的例子有这么一段代码:
fetchData: function() {
fetch(REQUEST_URL)
.then((response) => response.json())
.then((responseData) => {
this.setState({
movies: responseData.movies,
});
})
.done();
},
请问其中的 (response) => response.json() 是什么意思,=>的含义又是什么?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
这应该是ES6的写法吧,剪头函数。和
应该是一样的效果
应该是lambda表达式的写法
http://segmentfault.com/q/1010000003819756/a-1020000003819790
去看es6的箭头函数