Intermediate Swift
Q72 / 100

What is SwiftUI's @ObservedObject?

Correct! Well done.

Incorrect.

The correct answer is B) A property wrapper for a reference to an ObservableObject; the view re-renders when the object's @Published properties change

B

Correct Answer

A property wrapper for a reference to an ObservableObject; the view re-renders when the object's @Published properties change

Explanation

@ObservedObject var viewModel: MyViewModel causes re-renders when viewModel's @Published properties change. The view does not own the object.

Progress
72/100