MainActor is a new attribute introduced in Swift 5.5 as a global actor providing an executor which performs its tasks on the main thread. When building apps, it’s essential to perform UI updating tasks on the main thread, which can sometimes be challenging when using several background threads. Using the @MainActor
attribute will help ensure your UI is always updated on the main thread.
That’s something I still have to learn from scratch in Swift.