You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove outdated onboarding flow examples from medium-story.md and streamline the content to focus on VDFlow's UI-agnostic navigation capabilities. Enhance clarity on navigation state management while maintaining the document's overall structure.
This structure makes it easier to navigate to any point in the flow for testing or to handle external events.
243
-
244
146
## Key Benefits
245
147
246
148
VDFlow offers several advantages:
@@ -290,58 +192,7 @@ This preservation of state is crucial for maintaining form data, scroll position
290
192
291
193
## Beyond Screen Navigation
292
194
293
-
While many navigation libraries focus specifically on screen presentation, VDFlow is fundamentally UI-agnostic. It manages navigation state only, not UI presentation directly, making it versatile for various scenarios:
294
-
295
-
```swift
296
-
// Managing a complex form with multiple sections
297
-
@Steps
298
-
structFormFlow {
299
-
var personalInfo
300
-
var address
301
-
var payment
302
-
var review
303
-
}
304
-
305
-
// Visualized as:
306
-
// FormFlow
307
-
// ┌─────────┼───────┬──────┐
308
-
// Personal Address Payment Review
309
-
310
-
// Controlling UI components within a single screen
311
-
@Steps
312
-
structMapViewState {
313
-
var standard
314
-
var satellite
315
-
var traffic
316
-
var locationDetails: LocationInfo?
317
-
}
318
-
319
-
// Visualized as:
320
-
// MapViewState
321
-
// ┌────────────┼────────┬────────────┐
322
-
// Standard Satellite Traffic LocationDetails
323
-
324
-
// Managing design system components
325
-
@Steps
326
-
structExpandableCardState {
327
-
var collapsed
328
-
var expanded: ExpansionState = .basic
329
-
}
330
-
331
-
@Steps
332
-
structExpansionState {
333
-
var basic
334
-
var detailed
335
-
}
336
-
337
-
// Visualized as:
338
-
// ExpandableCardState
339
-
// ┌────┴────┐
340
-
// Collapsed Expanded
341
-
// │
342
-
// ┌───┴────┐
343
-
// Basic Detailed
344
-
```
195
+
While many navigation libraries focus specifically on screen presentation, VDFlow is fundamentally UI-agnostic. It manages navigation state only, not UI presentation directly, making it versatile for various scenarios
345
196
346
197
This separation of navigation state from UI presentation means VDFlow can be used for:
347
198
- Full-screen navigation
@@ -374,7 +225,3 @@ VDFlow adds minimal overhead to an application:
374
225
SwiftUI navigation doesn't have to be complex. By modeling navigation as a tree of states instead of scattered boolean flags, VDFlow provides a structured approach to what is often a challenging aspect of SwiftUI development.
375
226
376
227
The library focuses on simplifying navigation management while remaining lightweight and performant, making it suitable for both small projects and production applications with complex navigation requirements.
377
-
378
-
---
379
-
380
-
*What navigation challenges have you faced in SwiftUI? Have you tried tree-based navigation approaches? Share your experiences in the comments.*
0 commit comments