You do have to upgrade. At some point incompatibilities between libraries arise, and if neglected for too long at some point it becomes impossible to update everything. Keeping dependencies up to date is an important part of software maintenance.
In our case we wanted to upgrade another dependency (react-admin) which necessitated a react-router upgrade, which we used throughout the rest of our application, so it was a reasonable amount of work and sticking to the old one was not an option.