Closed eduardodallmann closed 3 years ago
Hi! Thank you for opening up this issue - I 100% agree that we should force save when components unmount. I'll get to adding that ASAP, or - feel free to open up a PR if you get to it!
This will be released in 0.3.0
🎉
first of all, I would like to thank you for this amazing lib and your elite work. but what if don't need this feature, is there any way to disable it?
Thanks @alisayed95! What use case do you have where you would not like this behavior? 🤔 We can make it optional in the next release, but I can't think of a situation where one would not want the callback to fire on unmount.
so now I'm building sort of reports which has three states "pending", "approved", "drafted". I'm using the lib in the drafted case but when the user click submit button the state should be approved or pending. but what happen that the state is being override in the unmount of the component. I wish my explanation was good enough.
Have nice day mate!
Hi, this lib is amazing. I have a question, how autosave behaves when componentWillUnmount fired before debounce time end? If the user quickly fill a input and switches to another screen by menu, autosave should force save. I tried but to no avail.