Hi,
In JIRA, a warning message appears when trying to navigate away from the current page with unsaved data entered into a form. This behaviour is exactly like what I am trying to achieve but unfortunately, there is an open issue with the Prompt component in the react-router-dom (https://github.com/ReactTraining/react-router/issues/5405). The issue prevents the browser's back button from behaving correctly and changes the URL even when the user cancels the navigation.
This scenario has been rather tricky and I haven't been able to find a solution or any solid examples of it working in React so it would be greatly useful if someone could possibly advise how to achieve this behaviour. Any general tips would also be much appreciated
Regards,
Patrick
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.