Had a problem in chapter 3.
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 28/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript, react, redux
- 领域
- frontend
调研方向
从第 88 行附近的 postsSlice.js 开始,复现第 3 章中加载帖子并创建新帖子的流程。比较拼接 loadedPosts 与替换 state.posts 时的行为;当列表只渲染一次、表情符号交互正常工作,并且新帖子按预期顺序出现时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Dave,
Love your stuff! You are the best. Thank you all all you're doing to help us new and inspiring developers.
In chapter three (I believe) I ran into a problem where the code added the 100 posts twice...creating a 200 post rendering and some weird behaviors for clicking on the emojis. When I added a new post it would place the new post right after the first post...not before.
I don't know the reason for this entirely...since I'm still new to the react and redux world but I hung with it for a while and eventually, in the postsSlice.js file (somewhere around line 88), I changed the code from:
'state.posts = state.posts.concat(loadedPosts);'
to
'state.posts = loadedPosts;'
With this change the rendering of all the posts twice stopped. With this change I also noticed that when I created a new post it was placed on the top. So I'm wondering if maybe between when you released the video tutorials and now (a couple of years later) maybe react, reduce, thunk or axios or something else has updated that created this twice rendering and making a 200 entry list of posts problem.
I wanted you to know what I encountered and how it was maybe fixed(???? time will tell as I do more work).
Wishing you all the best.
my email is jdavidmcgee@mac.com if you want to share any further insights...I am a new developer in training and your stuff is really really good!
All the best,
David
- 主要语言
- JavaScript
- 星标
- 789
- 派生
- 699
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
gitdagray/react_redux_toolkit 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 30/100
gitdagray/react_redux_toolkit#11 · 2 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 20/100
gitdagray/react_redux_toolkit#7 · 5 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 55/100
-
难度 2/5 1-3 小时 新手友好度 25/100
gitdagray/react_redux_toolkit#3 · 1 条评论 ·
查看 gitdagray/react_redux_toolkit 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
antfu-collective/icones#398 ·
-
ECmail.com 未关闭
难度 1/5 1 小时以内 新手友好度 90/100
wesbos/burner-email-providers#554 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
radiantearth/stac-browser#1023 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
components-web-app/docs#92 ·