See the upgrade guide in the react-admin v4 documentation: https://marmelab.com/react-admin/doc/4.0/Readme.html