How to clear nested view states

Let assume I have some view which is presented modally change it states and after close I need to clean it. Should I clean it onDismiss in that view or maybe. his parent should clear him by maybe some helper extension method on that State function clear(). What are you thought about it? Which approach would be the best or maybe something else? If I clear view state. onDisappear I can easily test it clear when it is not on screen anymore :thinking: and that view would always clear if disappear so it seems reasonable to clear part of this view that way but maybe the parent should responsible for that clearing. What is the best practice?

PS. Great architecture by the way, I love it.

Best regards,

1 Like
Terms of Service

Privacy Policy

Cookie Policy