Noé Casas
01/21/2021, 9:14 AMTobAppBar
from a Composable that does not have access to it? I am thinking in something like SwiftUI’s toolbar
and ToolbarItem
(e.g. see https://swiftwithmajid.com/2020/07/15/mastering-toolbars-in-swiftui/) . Also, is there a mechanism or pattern to set the `TopAppBar`’s title from somewhere else, like SwiftUI’s navigationTitle
?jim
01/21/2021, 12:43 PMadd actions to theAs a general rule of thumb, this sentence sounds like an inherent antipattern. Side-effects always look "easy" in quick code snippets, and then when they're all combined together to build a real application then the conglomeration becomes impossible to reason about, which is why we avoid side effects. A widget should not be modifying something it doesn't have access to. If a widget needs access to something (like a data model), that should be passed in explicitly.from a Composable that does not have access to itTobAppBar
Kari Kähkönen
01/21/2021, 1:51 PM