Manually clearing the view model in composable Component in Kotlin

28 Views Asked by At

I have a common login modal component in my app which is used at many places. This is a composable component( not Destination and i won't be able to convert it to destination). Now what i want that when my this modal gets closed, i want to clear my view model. In my view model I have many variables so resetting every variable doesn't seems to be a good practice. So is there is any way by which i can clear my view model when my modal gets closed.Any help would be appreciated. Thanks in advance.

0

There are 0 best solutions below