---
title: "Discussion on \"Dependency Injection in SwiftUI: Composing Views Without Singletons\" | Hashnode"
description: "Discussion on \"Dependency Injection in SwiftUI: Composing Views Without Singletons\". One of the most common pitfalls in SwiftUI apps is the overuse of singletons and global state. It feels convenient at first — you just reach for UserDefaults.standard, a shared NetworkService.shared,"
url: "https://hashnode.com/posts/dependency-injection-in-swiftui-composing-views-without-singletons/69e76241e43672781427d125"
---

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

Discussion

# [Dependency Injection in SwiftUI: Composing Views Without Singletons](https://swiftuicentral.com/dependency-injection-in-swiftui-composing-views-without-singletons?utm_source=hashnode&utm_medium=feed)

One of the most common pitfalls in SwiftUI apps is the overuse of singletons and global state. It feels convenient at first — you just reach for UserDefaults.standard, a shared NetworkService.shared,

Apr 21 · 5 min read · swiftuicentral.com  
Updated Apr 22  
Read the article

## Written by

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

@screwdriver

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

#SwiftUI #Swift #DesignPattern #CleanArchi #iOS

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
