This PR brings several new features and improvements:
Presentation and navigation can now be combined into a single routes array, removing the need for separate PStack and Stack. The new Router can handle both.
Convenience methods are now extensions on Array, with no more need for NFlow or PFlow, simplifying state management.
Large-scale navigation updates can now be made within a withDelaysIfUnsupported call, and will be broken down into smaller updates that SwiftUI supports. This works around a limitation in SwiftUI that only allows one screen to be pushed, presented or dismissed at a time.
The view builder closure for creating screens can now provide a binding to the screen so that screens can mutate their state within the routes array.
A new showing function makes it easy to have a fixed root screen which shows zero or more routes.
This PR brings several new features and improvements:
PStack
andStack
. The newRouter
can handle both.NFlow
orPFlow
, simplifying state management.withDelaysIfUnsupported
call, and will be broken down into smaller updates that SwiftUI supports. This works around a limitation in SwiftUI that only allows one screen to be pushed, presented or dismissed at a time.showing
function makes it easy to have a fixed root screen which shows zero or more routes.