vinhnx / notes

my today I learn (TIL) journal, includes everything that I found interesting, not necessarily relates to programming
44 stars 2 forks source link

SwiftUI + Combine note #270

Open vinhnx opened 5 years ago

vinhnx commented 5 years ago

References: (note to self, add new articles on the top)

SDK diffs:

== since SwiftUI is value type everytime you use reference type, use @ObjectBinding

@State

BindableObject:

@EnvironmentObject > @ObjectBinding [use EnvironmentObject to pass data around view hierarchy indirectly while ObjectBinding just to pass from superview to nearest child view (subsequently)]

@State > @Binding

super View should have @State child View should have @Binding superView @State [pass]-> childView @Binding

reference: https://developer.apple.com/wwdc19/226

--

TIL: SwiftUI List and ForEach reuse cell internally

https://twitter.com/jckarter/status/1143704650215858177?s=20

--

SwiftUI together with Combine will change everything we knew about iOS/macOS/tvOS/watchOS or whateverOS development

vinhnx commented 5 years ago

271

vinhnx commented 4 years ago

342