Skip to content

Replace CombineRef with ComputedRef (auto dependency tracking)#2

Open
anvuive456 wants to merge 1 commit intomasterfrom
claude/review-project-uwsXM
Open

Replace CombineRef with ComputedRef (auto dependency tracking)#2
anvuive456 wants to merge 1 commit intomasterfrom
claude/review-project-uwsXM

Conversation

@anvuive456
Copy link
Copy Markdown
Owner

  • Xóa CombineRef, combine2Refs, combine3Refs (cần khai báo dep thủ công)
  • Thêm ComputedRef: tự động phát hiện dependency qua RefTrackingContext
    • Chạy compute fn với tracking hook trong BaseRef.state getter
    • Hỗ trợ conditional dependency (chỉ track dep thực sự được đọc)
    • Hỗ trợ chuỗi computed (ComputedRef phụ thuộc ComputedRef)
    • Tự dọn dẹp listener khi dispose
  • Thêm tracking_context.dart (RefTrackingContext) dùng chung
  • Cập nhật base_ref.dart: state getter báo RefTrackingContext khi được đọc
  • Thay combine_ref_test → computed_ref_test (8 test cases)
  • Cập nhật combine_example và improved_example dùng computedRef

https://claude.ai/code/session_01WrwgtDawp6ZtR3yr1iwUBP

- Xóa CombineRef, combine2Refs, combine3Refs (cần khai báo dep thủ công)
- Thêm ComputedRef: tự động phát hiện dependency qua RefTrackingContext
  * Chạy compute fn với tracking hook trong BaseRef.state getter
  * Hỗ trợ conditional dependency (chỉ track dep thực sự được đọc)
  * Hỗ trợ chuỗi computed (ComputedRef phụ thuộc ComputedRef)
  * Tự dọn dẹp listener khi dispose
- Thêm tracking_context.dart (RefTrackingContext) dùng chung
- Cập nhật base_ref.dart: state getter báo RefTrackingContext khi được đọc
- Thay combine_ref_test → computed_ref_test (8 test cases)
- Cập nhật combine_example và improved_example dùng computedRef

https://claude.ai/code/session_01WrwgtDawp6ZtR3yr1iwUBP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants