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

Consume State and Side effects with Swift UI #2

Open
clajtayl opened this issue Mar 23, 2022 · 1 comment
Open

Consume State and Side effects with Swift UI #2

clajtayl opened this issue Mar 23, 2022 · 1 comment

Comments

@clajtayl
Copy link

Im struggling convert the .collectAsState() function used in jetpack compose to Swift UI. I am currently unable to access the state object from the viewmodel in SwiftUI. It is pretty straight forward in compose. Any insights on how to do this in SwiftUI? I see that you wrote a .asStateObject() extension function somewhere.

@clajtayl
Copy link
Author

I mainly need to understand how you are using Combine and @published to make this happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant