Skip to content

Glossary: SwiftUI

@MainActor

Also written: main actor, MainActor

An attribute that makes a class's code run on the main thread, where the screen is drawn. OrderModel uses it so data the screens show changes in a safe place.

Where the book teaches it

Related terms

main thread@Observable