Skip to main content

environment_model

Function environment_model 

Source
pub fn environment_model(view: &ViewHandle, model: &Model) -> ViewHandle
Expand description

.environment(model) — put the model where every view below can read it.

The Observable overload. A body that reads a property of the model through Model::get while SwiftUI is tracking it is re-run when that property changes; one that reads a different property is not.