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

Parallel states #6

Open
gioele-santi opened this issue Sep 30, 2020 · 0 comments
Open

Parallel states #6

gioele-santi opened this issue Sep 30, 2020 · 0 comments

Comments

@gioele-santi
Copy link

Hi, I read the article while programming in the last few days. It was very useful to better understand Combine + SwiftUI in the MVVM pattern. And also a very good chance to merge several concepts that I studied in the past but never realised I could combine effectively (like FSM and reactive programming).

My question is, at the beginning of the article you talk about a user registration view and since I am trying to do something similar I was wondering how could you manage parallel states...

I mean while in idle, waiting for a valid user input, the application should continuously validate the input (eg: no empty username, strong pw, correct retype of pw). I added some @published variables in ViewModel for username and password(s) and valid (to enable button) but the change in view is still managed by the single state and those are computed independently from it. Is there a better way to manage a state composed by more variables?

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