很简单的问题。我正在尝试读取此对象数组中“长度”变量的值(参见图 1)
我的代码
const mapStateToProps = (state, ownProps) => {
const lecture = state.firestore.ordered.lectures;
const length = lecture.length;
return {
length: length,
}
}
很简单的问题。我正在尝试读取此对象数组中“长度”变量的值(参见图 1)
我的代码
const mapStateToProps = (state, ownProps) => {
const lecture = state.firestore.ordered.lectures;
const length = lecture.length;
return {
length: length,
}
}