Coordinator Pattern: Taking Control of the Flow
dev.to·13h·
Discuss: DEV
🚪User Onboarding
Preview
Report Post

This article is a logical continuation of our dive into architecture. If in the first part we brought order inside the "black box" called ViewModel, here we’ll step beyond its boundaries. You’ll learn how to rip out navigation logic from ViewControllers and ViewModels, why prepare(for:sender:) is an architectural dead end, and how to build a navigation system that won’t turn your project into spaghetti when you add the tenth screen. We’ll break down the concept of Child Coordinators, solve memory leak problems, and discuss whether this pattern survived in the SwiftUI era.

If MVVM is responsible for what happens inside a screen, then Coordinator is the answer to the question "where are we going next?".

In Apple’s standard approach, navigation is baked right into `UIViewCont…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help