1
所以我有一个终极版店,看起来像这样:终极版推到第二级的对象与阵列
posts : {
posts: [
0: { },
1: { }
]
}
我想Concat的额外物品,如这个数组:
case LOAD_MORE_POSTS_SUCCESS:
return {
...state,
posts: [...state.posts, action.posts],
isFetching: false,
}
然而,这正在推动额外的职位只为第一级,香港专业教育学院试图做这样的事情(没有运气):
case LOAD_MORE_POSTS_SUCCESS:
return {
...state,
posts: [...state.posts.posts, action.posts],
isFetching: false,
}
完美的感谢,因为我需要包括传播运算符的行动:... action.posts。 – rhysclay