johnpatrickmorgan / FlowStacks

FlowStacks allows you to hoist SwiftUI navigation and presentation state into a Coordinator
MIT License
783 stars 56 forks source link

Add async-await support and parent-child coordinator example #25

Closed DavidKmn closed 2 years ago

DavidKmn commented 2 years ago

This PR improves the logic behind the function withDelaysIfUnsupported by utilising the new async-await APIs. Also it adds a more comprehensive example of Parent Coordinator that itself has other Coordinators as children. With the proposed PR it will also now be possible to dismiss child coordinators with their separate flows by delegating dismissal to the Parent coordinator, hence improving the library's usage for more complex modular multi feature project setups where each feature could live in a separate module and have its own Coordinator.

johnpatrickmorgan commented 2 years ago

This is great, thanks @DavidKmn! And thanks for the parent coordinator example! :) I'll merge and add a non-async variant that calls through to the async variant, for backwards compatibility.