我的商店看起来像这样,
{
name: "john",foo: {},arr: [
{
id:101,desc:'comment'
},{
id:101,desc:'comment2'
}
]
}
我的textarea看起来像这样
我的行动是
export const onChng = (desc) => ({
type: Constants.SET_DESC,payload: {
desc
}
});
我的减速机
case Constants.SET_DESC:
return update(state,{
store: {
streams: {
desc: { $set: action.payload.desc }
}
}
});
它只有在arry是一个对象时才有效,我不得不对数组流进行更改,我很困惑如何更新到数组,以及如何从商店中获取正确的值.