---
title: "Discussion on \"SwiftUI - Extract navigation logic from SwiftUI views for testability\" | Hashnode"
description: "Discussion on \"SwiftUI - Extract navigation logic from SwiftUI views for testability\". Problem: How to test your navigation logic in SwiftUI ?\nSolution: Extract navigation logic in a separate Service that handles it using UIKit\nSwiftUI is very powerful tool, for UI creation and animationBut I really don't like the navigation logicThat ..."
url: "https://hashnode.com/posts/swiftui-extract-navigation-logic-from-swiftui-views-for-testability/62b1ac7294003a788976da99"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [SwiftUI - Extract navigation logic from SwiftUI views for testability](https://swiftuicentral.com/swiftui-extract-navigation-logic-from-swiftui-views-for-testability?utm_source=hashnode&utm_medium=feed)

Problem: How to test your navigation logic in SwiftUI ? Solution: Extract navigation logic in a separate Service that handles it using UIKit SwiftUI is very powerful tool, for UI creation and animationBut I really don't like the navigation logicThat ...

Jun 21, 2022 · 20 min read · swiftuicentral.com  
Read the article

-   [#swiftui](https://hashnode.com/tag/swiftui)
-   [#tdd](https://hashnode.com/tag/tdd)
-   [#swift](https://hashnode.com/tag/swift)
-   [#ios](https://hashnode.com/tag/ios)

## Written by

[Alexandre Alcuvilla](https://hashnode.com/@screwdriver)

@screwdriver

  
[View profile](https://hashnode.com/@screwdriver)

#SwiftUI #Swift #DesignPattern #CleanArchi #iOS

## Responses 1

Markdown supported · ⌘↵ to post

[Saurabh Mishra](https://hashnode.com/@s4saurabhmishra)

[Aug 8, 2022](https://hashnode.com/posts/swiftui-extract-navigation-logic-from-swiftui-views-for-testability/62b1ac7294003a788976da99/comment/62f0bef8dfc2b155658857ca)

nice read , thanks for sharing :)

[Alexandre Alcuvilla](https://hashnode.com/@screwdriver)

[Aug 10, 2022](https://hashnode.com/posts/swiftui-extract-navigation-logic-from-swiftui-views-for-testability/62b1ac7294003a788976da99/comment/62f0bef8dfc2b155658857ca#reply-62f3515a408d676b1b58bfe2)

You’re welcome, glad that you enjoy this article.
