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

CU-862k43hfa - Add circuit and decouple viewmodel from view #127

Conversation

newmskywalker
Copy link
Contributor

No description provided.

@newmskywalker newmskywalker requested a review from a team as a code owner July 11, 2023 14:27
@newmskywalker
Copy link
Contributor Author

@newmskywalker newmskywalker force-pushed the jm/CU-862k43hfa_Add-circuit-and-decouple-viewmodel-from-view branch from 1bd7400 to 9911935 Compare July 11, 2023 14:41
import io.newm.feature.login.screen.createaccount.signupform.SignupFormUiEvent

sealed interface CreateAccountUiState : CircuitUiState {
data class SignupForm(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, curious with this approach will we be able to reuse states like Loading, Error or will those states have to exist within CreateAccountUiState seal class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could technically reuse them, but the overhead is not worth it

import io.newm.feature.login.screen.password.ConfirmPasswordState
import io.newm.feature.login.screen.password.PasswordState

class CreateAccountPresenter : Presenter<CreateAccountUiState> {
Copy link
Contributor

@wlara wlara Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never heard about this Circuit library before. They should have used a different name instead of Presenter, because of all the old MVP architecture baggage. Or is Circuit really Mvp?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's MVP with unidirectional data flow

@newmskywalker newmskywalker merged commit 37522f6 into development Jul 15, 2023
1 check passed
@newmskywalker newmskywalker deleted the jm/CU-862k43hfa_Add-circuit-and-decouple-viewmodel-from-view branch July 15, 2023 20:25
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

Successfully merging this pull request may close these issues.

3 participants