A good routine is generally energizing, but when you miss having your matcha tea or meditation one morning, it’s easy to kick yourself and get discouraged.
Which is when I remind myself of this visual. Thank you, Harsh Darji. 🙏

A good routine is generally energizing, but when you miss having your matcha tea or meditation one morning, it’s easy to kick yourself and get discouraged.
Which is when I remind myself of this visual. Thank you, Harsh Darji. 🙏

Luckily, nobody was injured when the blue particle-beam suddenly shot down from above. It missed that one dude by inches. 😱😉 #laser #lightbeam #concert #austin #texas #atx #shotoniphone #edm #livemusiccapitaloftheworld #theconcourseproject #justkidding
via Instagram https://instagr.am/p/CsAQLXfNGAI/

Whenever I get stuck on a sticky problem in SwiftUI, I keep referring back to this great video from WWDC21 for context.
The video provides the bigger picture of how SwiftUI works with great analogies to the real world for better understanding.
I thought I’d give this video the super summary treatment to boil it down the most ideas that you can absorb at a quick glance. Refer to the full video 👆 for more info.
Identity is how SwiftUI recognizes distinct elements throughout the view’s lifetime.

Identifiers should be stable and unique; it acts like a key. Multiple views cannot share the same identifier.
Choosing a good identifier is your opportunity to control the lifetime of your view and data.
Explicit identifiers are like a dog name and are set with the id parameter. An explicit id is helpful if you want to refer to the view from other views.

Implied identifiers are an inherent identity based on the view’s structure, represented as if statements and other conditions in SwiftUI.

Lifetime tracks an existing view’s data over time. For example: the same cat (per identity) can be awake, asleep, annoyed, hungry, etc. over time.

Whenever identity changes, the state is replaced.
Dependencies are how SwiftUI understands when your UI needs to be updated.
Dependencies are the vars on the view, ie. Binding, State, Environment, ObservableObject, etc.

These data elements combine to create a dependency graph that SwiftUI uses to trigger view updates.
Inert modifiers are cheap and encouraged over branches (structurally different, separate implied identifier).

Summer has (basically) arrived. ☀️ #bartonsprings #barkingsprings #canoe #dam #dogs #summer #austin #texas #atx #shotoniphone via Instagram https://instagr.am/p/CrzQXBcMzJ6/

Pixel city / 8-bit town. 👾 This is the wall of a water cooling plant. #8bit #architecture #austin #texas #atx #shotoniphone #noedit via Instagram https://instagr.am/p/CruKqcjtSlq/
