popcodeorg / popcodeorg/popcode

React key warning in development mode

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

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

bug
Ngôn ngữ chính
JavaScript
Star
191
Fork
143
Merge trung bình
4 ngày 11 giờ
Pull request đã merge (30 ngày)
5

Mô tả

When developing, if you open a fresh Popcode environment and type <h1 into the HTML editor, the console displays this React warning:

Warning: Encountered two children with the same key, `unclosed-tag,8`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
    in ul (created by ErrorList)
    in div (created by ErrorList)
    in ErrorList (created by ErrorReport)
    in div (created by ErrorReport)
    in ErrorReport (created by Connect(ErrorReport))
    in Connect(ErrorReport) (created by Output)
    in div (created by Output)
    in div (created by Output)
    in Output (created by Workspace)
    in div (created by Workspace)
    in div (created by Workspace)
    in main (created by Workspace)
    in div (created by Workspace)
    in Workspace (created by Connect(Workspace))
    in Connect(Workspace) (created by Application)
    in Provider (created by Application)
    in Application

You don't see this in production since the warnings get stripped in the production version of React. Just wanted to note this—feel free to close if you already know about it or aren't worried about it.

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.

Hướng nghiên cứu

Tái hiện cảnh báo bằng cách mở một môi trường Popcode mới và nhập <h1 trong trình chỉnh sửa HTML. Bắt đầu với component ErrorList được nêu trong React stack trace và kiểm tra cách các mục trong danh sách của nó nhận key; hoàn tất khi cảnh báo về key trùng lặp không còn xuất hiện trong môi trường development.

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

Đánh giá

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

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.