Considering Alternatives to SwiftUI for a Complex App

I am working on an application that has some complex navigation needs, and I'm considering abandoning SwiftUI, at least in a few core areas of the app. I found SwiftUI intuitive and useful for simple things like:

  1. Using a state to toggle the appearance or disappearance of an element
  2. Using state to alter the look of UI elements
  3. Watching the values of built-in interfaces like TextField or Slider
  4. Controlling out-of-the-box UI elements like NavigationSplitView

But now I've got a UI that depends on a data model that can change at any time, and from that data I'll display lists of objects, and objects in detail, and all of this will be displayed according to a NavigationPath that depends on the data model's internal structure. This means that, for instance, I may be in the detail view of element X after having traveled to it from the detail view of element Y which was tapped in a list of XYZ, which was the result of tapping into part of the detail view of element W. This whole path could be invalidated by an update to the data model when it's received from the network. Furthermore, any element could have it's details changed, or be deleted, and I'd want the UI to reflect that right away if possible.

For the navigation work, I'm still optimistic that custom edits to a NavigationPath could be the way to go. However, for propagating data updates around my app, I know @State, @Bindable, etc are intended to handle this kind of thing, but when I'm try to send these bindings through the circuitous path of views I mentioned above, and I run into any unexpected hiccup, it feels like I'm at a disadvantage when debugging because I'm relying on opaque SwiftUI Magic to handle things under the hood in a way I don't really understand. I could put more effort into learning how this works, and potentially come up against some platform limitations, bugs, or other dead-ends, or I could just use Pub/Sub and a network of custom queues/pipes, and send updates around my app the old fashioned way, but using primitives whose functions are clear to me. I've been using SwiftUI for about a year and it still trips me up, and I have watched a few WWDC talks on the topic.

I'd appreciate any advice on this front from the frequenters of this forum. Thanks for reading my post.

Have you considered the navigation library from the people at point.free?

https://github.com/pointfreeco/swiftui-navigation

They have corresponding videos about the subject

https://www.pointfree.co/collections/swiftui/navigation

some of them are free:

https://www.pointfree.co/episodes/free

It is particularly important to them to drive all navigation from state as described here:

https://swiftpackageindex.com/pointfreeco/swiftui-navigation/main/documentation/swiftuinavigation/whatisnavigation#State-driven-navigation

for iOS..use it..it is mostly fine, but for macOS...not so much. constant performance problems. New OS release == new problems.

Considering Alternatives to SwiftUI for a Complex App
 
 
Q