Question: How is the stack lifecycle (`activities` array) intended to be managed?
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend, mobile-dev
Hướng nghiên cứu
Bắt đầu với tài liệu chính thức về useStack() và vòng đời của các activity xoay quanh push, replace và pop. Xác định xem array có được cố ý chỉ cho phép nối thêm hay không, và việc quay lại root có nên cắt bớt nó hay vẫn có thể quan sát được thông qua transitionState, isTop và isActive. Hoàn tất có nghĩa là ghi lại hành vi dự kiến hoặc xác định yêu cầu reset/cắt bớt rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
According to the official documentation, the useStack() hook can be used to access the stack state within UI components. However, when examining the activities array returned from useStack(), I noticed that its length increases by one each time the push or replace functions are called, and does not decrease when the pop function is invoked.
It is true that by checking properties such as transitionState, isTop, or isActive, one can determine which screen the user is currently viewing. Still, if the user repeatedly performs push or replace operations, the array continues to grow regardless of what the user actually sees. Intuitively, in scenarios such as when the user has finished navigating and returned to the root activity, one would expect the array to reset. Without some form of cleanup, the length of the array could, at least in theory, grow without bound.
As far as I know, Stackflow does not currently provide an API to reset or trim the stack state array in this manner. Of course, since Stackflow is obviously well-designed to be easily extended and customized through plugins, I imagine it would not be very difficult for me to implement additional functionality by myself if needed. That said, before proceeding, I would like to confirm whether my understanding aligns with the framework’s intended design. Or am I perhaps misunderstanding how the lifecycle of the stack is meant to be managed?
- Ngôn ngữ chính
- TypeScript
- Star
- 1k
- Fork
- 114
- Merge trung bình
- 59 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của daangn/stackflow
-
스와이프 백 애니메이션 덜컥임 이슈Có thể làm lại được @Shennng đã nhận 222 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Vue3 지원 계획Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
다른 호스트로 이동해야할 때 처리에 관하여Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
-
App 푸시로 앱에 들어왔을 때 뒤로가기 시 메인으로 이동Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Tất cả issue của daangn/stackflow
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
aws/agentcore-cli#2606 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa bug Cosmetic
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa bug claude Minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
linagora/twake-mail-admin#301 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
reproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
anomalyco/opencode#56038 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày