Rajveer·Nov 2SwiftUI Ownership vs. Access: Why @Binding Doesn’t Own Your DataOne common source of confusion in SwiftUI is the belief that @Binding holds or owns a value. To understand SwiftUI data flow, it is…
InCross CommitbyRajveer·Oct 19Why onAppear Is Not a One-Time Lifecycle EventDevelopers often assume that SwiftUI’s onAppear executes only once when a view is created. I was there once too, placing viewDidLoad…
Rajveer·Oct 12SwiftUI State Storage: Where Does @State Actually Live?SwiftUI views are value types (structs), and SwiftUI recreates them frequently. Each time SwiftUI evaluates a view’s body, it produces a…
InCross CommitbyRajveer·Oct 4SwiftUI AnyView, Navigation, and Rendering: Advanced View Tree GuideSo far, we’ve explored how view identity and state lifetime works in part 1 and part 2. Identity becomes even more interesting when we look…
InCross CommitbyRajveer·Sep 20SwiftUI State Lifetime and Identity: Conditional Branches and .id() ExplainedIn the previous article, we explored how SwiftUI’s View Tree and identity determine how views are understood across updates. The next…
InCross CommitbyRajveer·Sep 15SwiftUI View Tree Explained: View Identity and Structural IdentityHave you ever toggled a simple if condition in SwiftUI, only to see your @State reset? The reason lies in how SwiftUI manages its View…
Rajveer·Sep 7Avoiding Unnecessary Body Invalidation in SwiftUISwiftUI’s declarative syntax makes it easy to build interfaces, but it also hides an important performance consideration: body…
Rajveer·Aug 31SwiftUI @Environment: Performance Optimisation Through Smarter ArchitectureIn Part 1, we saw that an environment write makes SwiftUI traverse the entire subtree beneath the modifier. Even views that are ultimately…
InCross CommitbyRajveer·Aug 24SwiftUI @Environment: The Overlooked Performance OverheadAt a “Meet with Apple” developer event, an Apple engineer made a statement:
Rajveer·Aug 17The Hidden Cost of ObservableObject in SwiftUII once ran into a strange SwiftUI performance issue: a single timer updating remainingTime every second was making my entire dashboard 10…