I am using React Router's Prompt to show a prompt if the user is navigating from the page without saving their changes. I want to give the user an option to save or discard the changes they have made in the form.
I can show the prompt but cannot handle the user's click. I cannot save anything if the user clicks on the ok button. I checked the doc and didn't find any way of doing it.
Please help me to solve this issue. Thanks in advance.