Is there an example of a LoginComponent. I have se...
# decompose
f
Is there an example of a LoginComponent. I have setup: • LoginPage ◦ EditComponent for TextInputFields ◦ AuthComponent for when clicking Login button. (This component needs the values from EditComponent to make a loginrequest. I am trying to find out how to pass those values from EditComponent to AutoComponent. Or is is for simplicity better to have all do values in one component -> LoginPageComponent which would make it les reusable I think
a
You can just put those values into the AuthComponent's Configuration (in the parent), and then pass them to the component via constructor.
You can also create a data class like:
data class AuthComponentParams(...) : Parcelable
f
I think you have done something similar in your live coding in Russian
a
Perhaps, I barely remember 😀 But that's a generic way of passing arguments.