SwiftUI's #PreferenceKey it’s great for passing data upwards in your view hierarchy. Unlike #EnvironmentKey, PreferenceKey is perfect for sharing calculated data or measurements. πŸ“ so far I’ve been using it to calculate the header height based on child views content and collapsing it on scroll view offset. πŸ€” Curious to know any other examples, share if you can πŸ™Œ ! #iosdev #swiftui