Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftUI + Combine note #270

Open
vinhnx opened this issue Jun 5, 2019 · 2 comments
Open

SwiftUI + Combine note #270

vinhnx opened this issue Jun 5, 2019 · 2 comments

Comments

@vinhnx
Copy link
Owner

vinhnx commented Jun 5, 2019

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

  • view local
  • value type
  • framework managed

BindableObject:

  • external
  • reference type
  • developer managed

@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
Copy link
Owner Author

vinhnx commented Jun 6, 2019

#271

@vinhnx vinhnx changed the title SwiftUI SwiftUI + Combine Jun 14, 2019
@vinhnx vinhnx changed the title SwiftUI + Combine SwiftUI + Combine note Jun 27, 2019
@vinhnx vinhnx pinned this issue Jul 2, 2019
@vinhnx
Copy link
Owner Author

vinhnx commented Nov 20, 2020

#342

@vinhnx vinhnx mentioned this issue Nov 22, 2020
@vinhnx vinhnx unpinned this issue Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant