---
title: "Discussion on \"How to Type-Erase Routes in a SwiftUI App\" | Hashnode"
description: "Discussion on \"How to Type-Erase Routes in a SwiftUI App\". In this tutorial we will learn how to use type erasure so a SwiftUI NavigationStack can push different detail screens from a single path. Our example is a small weather app with two forecast destinati"
url: "https://hashnode.com/posts/how-to-type-erase-routes-in-a-swiftui-app/6ab1e1dedf1dc79213d06d1c"
---

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

Discussion

# [How to Type-Erase Routes in a SwiftUI App](https://iliaskarim.dev/how-to-type-erase-routes-in-a-swiftui-app?utm_source=hashnode&utm_medium=feed)

In this tutorial we will learn how to use type erasure so a SwiftUI NavigationStack can push different detail screens from a single path. Our example is a small weather app with two forecast destinati

Sep 22 · 6 min read · iliaskarim.dev  
Updated Oct 28  
Read the article

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

## Written by

[Ilias Karim](https://hashnode.com/@iliaskarim)

@iliaskarim

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

## Responses

Comments are turned off for this post.
