Skip to content

Commit 62a9fed

Browse files
committed
fix #5213
1 parent c3fc6bd commit 62a9fed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Reports/2025/#359-2025.12.01.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@
5454
### 🐎 [Task Identity](https://chris.eidhof.nl/post/swiftui-task-identity/)
5555

5656
[极速男孩](https://github.com/ztlyyznf001):文章指出 SwiftUI .task 的常见陷阱:它默认只在视图出现时运行,不会自动响应属性变化。若 View 的入参更新,Task 不会重跑,导致数据不同步。解决方案是使用 .task(id: 依赖项)。通过显式绑定依赖(如 url),当值变化时,SwiftUI 会自动取消旧任务并重启新任务,确保副作用逻辑与最新状态保持一致。
57+
58+
### 🐎 [Pitfalls of Parameterized Tests](https://swiftology.io/articles/pitfalls-of-parameterized-tests/ )
59+
60+
[@david-clang](https://github.com/david-clang):本文分享了 Swift Testing 中参数化测试的五大常见陷阱,并提出了关键的最佳实践。其核心思想是:应在测试数据中预先建立清晰的“输入-输出”映射关系,并使用预定义的静态值作为期望结果,从根本上避免测试逻辑与实现逻辑的耦合。
61+
5762
## 工具
5863

5964
### [Mole:像鼹鼠一样深入挖掘来清理你的 Mac](https://github.com/tw93/Mole)

0 commit comments

Comments
 (0)