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

Support React elements in components like `IconButton` for server components

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

Maintainer thường phản hồi trong vòng 2 ngày

@joshblack đang làm issue này rồi.

Từ ngày 28/9/2026.

  • #8450 của @copilot-swe-agent — đang mở

Đá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
65/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Look at the IconButton component and related icon-handling components in the source. Understand how icons are currently accepted as functions and how React Server Components (RSC) serialize props. The change likely involves modifying prop types and the rendering logic to accept React elements. Check existing tests for IconButton to see how to update them. 'Done' means IconButton works with both function and element icons in RSC contexts.

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

Mô tả

component: IconButton staff

Currently, components like IconButton only accept a function for icons. This prevents it from being used in an RSC context since only plain objects can be passed from server to client components. For example:

<IconButton aria-label="Menu" icon={KebabHorizontalIcon} />

Will not work by default in RSC due to this limitation. Instead, we should support:

<IconButton aria-label="Menu" icon={<KebabHorizontalIcon />} />
Ngôn ngữ chính
TypeScript
Star
3.9k
Fork
697
Merge trung bình
3 ngày 12 giờ
Pull request đã merge (30 ngày)
41

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

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 primer/react

Tất cả issue của primer/react

Issue tương tự

Thêm issue về TypeScript

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.