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
Arkadii Ivanov
06/17/2023, 12:11 PM
You can just put those values into the AuthComponent's Configuration (in the parent), and then pass them to the component via constructor.
Arkadii Ivanov
06/17/2023, 12:12 PM
You can also create a data class like:
data class AuthComponentParams(...) : Parcelable
f
Farid Benhaimoud
06/17/2023, 12:13 PM
I think you have done something similar in your live coding in Russian
a
Arkadii Ivanov
06/17/2023, 12:15 PM
Perhaps, I barely remember 😀 But that's a generic way of passing arguments.