then(res => res.json())react-native提取中的以下代码段是什么意思?
fetch(url)
.then(res => res.json())
.then(res => {
this.setState({
data: res,
error: res.error || null,
loading: false
});
Run Code Online (Sandbox Code Playgroud)