执行mapStateToProps之后,我想根据数组中的元素过滤属性。但这会引发类型错误
const mapStateToProps = (state) => {
console.log(state)
return {
hires: state.firestoreHires.ordered.hires
}
}
const importHires = this.props.hires.filter(item => item.hireType == "import")