I am using a preview with my view that looks like this -
#Preview {
PaywallTwo(store: MyStore())
}
In this scenario, MyStore
is a MainActor
, but has an initialiser doing some async work inside a Task
from the initialiser.
I am not sure if this is an implementation error, or perhaps something wrong with the new #Preview, as this was working fine with PreviewProvider
I currently have complete
strict concurrency, and the error I get is:
call to main actor-isolated initializer 'init()' in a synchronous nonisolated context