给出此代码
import React from 'react';
const Result = props => {
const {err, city} = props.checkWeather
return (
<div>Pogoda dla: {city} </div>
);
}
export default Result;
我看到此错误:
TypeError:undefined不是对象(正在评估'_props $ checkWeather.err')
如果我删除行const{err,city} = props.checWeather
...,它行得通,但不符合我的意愿...