在链接:Task-Based Updates 我不明白下面的代码:终极版 - 我不明白,“基于任务的更新”例如
import posts from "./postsReducer"; // missing this code??
import comments from "./commentsReducer"; // missing this code??
和为什么要这么做?
const combinedReducer = combineReducers({
posts,
comments
});
const rootReducer = reduceReducers(
combinedReducer,
featureReducers
);
only featureReeducers okie?不需要combindedReducer? anh什么是postsReducer代码,commentsReducer代码?
感谢您的帮助!
'postsReducer' and'commentsReducer' are here:http://redux.js.org/docs/recipes/reducers/UpdatingNormalizedData.html#slice-reducer-composition – CodinCat
但是,在该链接中,评论是: '// redurs/posts.js' '// redurs/comments.js' so,import should: 'import postsReducer from“./posts”; //不从“./postsReducer”导入帖子;' '从“./comments”导入commentsReducer; // not import comments from“./commentsReducer”;' 和其他问题,为什么需要'reduceReducers(combinedReducer,featureReducers)'?处理redux状态树两次?一个与combinedReducer组合,然后继续使用featureReducers? 感谢您的回复! – CuongNT