【发布时间】:2021-03-17 14:12:03
【问题描述】:
我在我的组件中使用了调度,如下所示,但我收到错误 modifySeatMap is not defined 。但我确实在我的一个操作文件中定义了 modifySeatMap 函数。为什么这显示 modifySeatMap 尚未定义? 常量调度 = useDispatch();
const changeStatus=(seat)=>{
console.log("change status called with seat",seat)
seat.status="selected"
dispatch(
modifySeatMap(props.seatMap))
}
这里为什么没有定义 modifySeatMap?
【问题讨论】:
标签: react-native redux react-redux