Unit 02 of 03
State and Navigation
Local state owned by a view, sharing state with a child view through a binding, observable objects outside the view, environment values passed down the tree, the programmatic navigation stack and path, sheet, alert and cover presentation, tabs and toolbars.
Published Updated
Lessons
- 01 Local State Measuring that a view's own state recomputes only that view, that lifting the same state to an ancestor turns the trigger into parent, and that a sibling's state leaves the read off-rule. 10 min read
- 02 Bindings Measuring that a child writing a parent's state through a binding is recomputed with the parent trigger, and that the trigger depends on the owner of the value, not on who started the change. 9 min read
- 03 Observable Objects Measuring that reading a property of an observable object produces a recomputation on change, verifying with real observation tracking that only a read property notifies, and showing what object-level notification changes. 9 min read
- 04 Environment Values Measuring that an environment value recomputes only its reader along the tree without touching the views in between, that a property of an object placed in the environment triggers observation rather than environment, and how overriding in a subtree is built in the model. 9 min read
- 05 The Navigation Stack and Path Measuring that the navigation path is a state held at the root, that pushing and going back produce the same trigger, and that a value pushed onto the path is not a view. 10 min read
- 06 Presentation and Dismissal Measuring that presentation state lives in the presenting view, that sheet content reads this state through a binding, and that the dismiss action is not a value. 9 min read
- 07 Tabs and Toolbars Measuring that the tab selection lives at the root, that content which only writes the selection through a binding does not count as a reader, and that a tab that is not selected is skipped because it does not read the selection. 9 min read