Text timer inside ScrollView?

Code:
Code Block
struct ContentView: View {
var body: some View {
ScrollView {
Text(Date(), style: .timer)
}
}
}

Produces crash:

Code Block
Thread 1: EXC_BREAKPOINT

in:

Code Block
DisplayList.ViewUpdater.ViewCache.setNextUpdate(_:item:state:tag:) ()

Any recommendations/workarounds?

I have tried many combinations, inserting in a Stack, …

.timer style always crash in a ScrollView, where .time style works OK.

Either it is a bug or it is a forbidden pattern not documented.

I found a solution here to make it work:
https ://www.hackingwithswift .com/quick-start/swiftui/how-to-use-a-timer-with-swiftui

Code Block
struct ContentView: View {
@State var currentDate = Date()
let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect()
var body: some View {
ScrollView([.horizontal, .vertical]) {
Text("\(currentDate)")
.onReceive(timer) { input in
self.currentDate = input
}
}
}
}

Text timer inside ScrollView?
 
 
Q