How do I prevent page exit with unsaved data in my app?

How do I prevent page exit with unsaved data in my app?

Hi!

Currently what i do is i have a state that will fetch and store any field data that i want to look out for.

I will use that state to compare with the relevant input.

You can use that comparison as a conditional to run whatever workflow that’s required.

If u need a modal to run then you will have to run a JS script. I don’t use it so I can’t point u to the right direction for said script.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.