I wanted to alert my users when they tried to leave the page with unsaved changes in the form.
Following the docs (https://marmelab.com/react-admin/doc/3.7/CreateEdit.htm