Перенаправить замену в React

<Redirect to="/" />
// has been replaced with
<Navigate replace to="/" />

<Route path="/somePath" element={<Navigate replace to="/" />} />
Code Rabbi