0
我派遣一个动作:disptach动作错误,数值显示为嵌套对象
removeAchievement(achievement){
this.props.removeAchievement({
type: 'REMOVE_ACHIEVEMENT',
id: this.props.day.id,
text: achievement,
})
}
行动的创建者:
export const removeAchievement = (id, text) => ({ type: types.REMOVE_ACHIEVEMENT, id, text })
我减速
但是,这些数据似乎嵌在我的ID是这样的:
怎么能阻止它被嵌套?
如果 -
与ID和文字,而不是说它你在调度之前在你的组件中使用'console.log' this.props.day.id',你会得到什么? –
向我们展示'removeAchievement'动作创建者。 – Ioan
更新的问题 – Bomber