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

Add useTitle option to restore original on unmount

Đang mở
#2,561 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.

Đánh giá

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

Hướng nghiên cứu

Start by locating the useTitle hook and reading how its existing restoreOnUnmount option behaves. Add the requested restoreOriginalOnUnmount option so unmounting restores the first title value rather than the previous one, and verify that the About-to-Profile-to-Home scenario produces the intended title.

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

Mô tả

Is your feature request related to a problem? Please describe.
When implementing useTitle you'd usually want to show a default when a page has not implemented the hook yet.

Describe the solution you'd like
An option restoreOriginalOnUnmount which will revert to the first title value.

Describe alternatives you've considered
restoreOnUnmount does a similar thing, but it reverts to the previous title, not the original one. This is actually not so useful for pages: if you go from About to Profile to Home and the latter doesn't set a title, it will restore to About.

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

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

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 streamich/react-use

Tất cả issue của streamich/react-use

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.