Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Had a problem in chapter 3.

未关闭
#14 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 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

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

gitdagray/react_redux_toolkit 的其他 Issue

查看 gitdagray/react_redux_toolkit 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。