Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Had a problem in chapter 3.

Đang mở
#14 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
28/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, react, redux
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu với postsSlice.js quanh dòng 88 và tái hiện luồng ở chương 3, trong đó tải các bài đăng và tạo một bài đăng mới. So sánh hành vi của việc nối loadedPosts với việc thay thế state.posts; được xem là hoàn tất khi danh sách được render một lần, các tương tác với emoji hoạt động và các bài đăng mới xuất hiện theo đúng thứ tự dự kiến.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
JavaScript
Star
789
Fork
699
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của gitdagray/react_redux_toolkit

Tất cả issue của gitdagray/react_redux_toolkit

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.