How to prevent toast when unmounting a component?
I’m trying to prevent toast, when component unmount, if user click onSubmit. Trying to do with useState, but it didn’t work for me.
My goal is to show user toast but if he click onSubmit, he shouldn’t have to see this toast. Toast should have appears when component unmount and we go away from page with form without submit.