This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
// This is an example of how to keep the ObservableObjects near the root of the view hierarchy | |
// and dispatch actions from any view easily without having to pass too many things down. This | |
// helps keep the views simple and makes previews a lot easier. | |
// | |
// This is inspired from what Apple is doing with `DismissAction`, `OpenURLAction`, `OpenWindowAction`, etc... | |
// The following is a very simple example with only two view-levels and we could pass closures directly, |
OlderNewer