Long #SwiftUI Question:

I have a TabView in Study that is two layers down from the MainView. When an URL is opened, I want to change the tab. Initially I had a State variable in the main app and forwarded this as a Binding over the two layers. And that worked fine

1/4

Follow

@klemensstrasser @jknlsn from what you've described I would say there's nothing to fix. Any changes to the ObservableObject must re-evaluate the whole hierarchy (even if your view is interested in only one property, say the selected tab).

As long as you're not doing anything expensive, these sort of re-evaluations are fine.

@phill @jknlsn Thanks! I also don't see any performance issues, but it just felt wrong!

Sign in to participate in the conversation
The Not So Big Company

The home of The Not So Big Company on Mastodon.