79414585

Date: 2025-02-05 11:30:39
Score: 4
Natty:
Report link

Taking the comments about a Timer in a stopwatch app into consideration, if you absolutely need to use the Timer in the class, you can mark it as @Transient and SwiftData will not persist it.

@Transient private var timer: Timer?
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • User mentioned (1): @Transient
  • Low reputation (1):
Posted by: Alun