A graph-based SwiftUI router

Hello everybody, I'd like to share my latest work: Helm, a declarative, graph-based router for SwiftUI.

I've been using SwiftUI for a while and I've always felt routing is not yet where it could be. (I'd say it's altogether missing from the vanilla version)

I wrote Helm trying to solve a couple of problems:

  • navigation is part of the app's state and should have one source of truth
  • presenting views should know very little regarding the kind of component (and its dependencies) they're about to present
  • deeplinking, and in general, reaching any screen, in any state should be easy and work out of the box
  • same with saving/restoring the navigation path
  • iterating all the screens variants (e.g. for snapshot testing) or some of them (e.g. for recording promotional videos and so on) should be possible

I currently treat it as beta, since I've yet to release an app using it, but any feedback is welcome!

10 Likes