i need to alert to the user when he´s going to leave the URL where i have an Text Editor.
I´m working with React + JS. I declare an state that´s change to true when the user starts typing on the Text Editor but idk how can i handle the other part