You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Hi, because the ViewModel provider has the function (ViewModelProvider.get(key, clazz)) that can let you pass the key to ViewModel provide in order to get a different ViewModel with a different key, I want to raise this PR, and according to this : #213.
Describe the solution you'd like
Add the key variable to every get ViewModel function. like this PR #1373
The text was updated successfully, but these errors were encountered:
@arnaudgiuliani I believe a qualifier would not be able to do the same once you could use multiple instances of the same ViewModel class for different views simultaneously, attaching them by a key.
This answer #782 (comment) used to work in previous versions, but probably the library's internal logic has changed since then.
Adding the possibility of setting a key to creating multiple instances from a single definition would help a lot in cases where you have multiple stateful components that share the same type o ViewModel in a list, like in a feed, for example.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is your feature request related to a problem? Please describe.
Hi, because the ViewModel provider has the function (ViewModelProvider.get(key, clazz)) that can let you pass the key to ViewModel provide in order to get a different ViewModel with a different key, I want to raise this PR, and according to this :
#213.
Describe the solution you'd like
Add the key variable to every get ViewModel function. like this PR #1373
The text was updated successfully, but these errors were encountered: