---
# System prepended metadata

title: React Router v6 Upgrade Requirements

---

# React Router v6 Upgrade Requirements

React router v6 is major update which introduce completely new API. A lot of improvements and simplifications. It is not backward compatible with v5 and requires code refactoring.
## New things
*that affect us*
- relative route nesting - no need of concatenating `path` and `url` for constructing route matchers 

 
- relative navigation - Links are aware where they are used and navigation could be declared relatively. The last one solve the problem for navigating from `/new` to `/{:newId}`:

```javascript=
// v5
const history = useHistory();
...
const newGroupPath = url.replace('/new', `/${groupId}`);
history.replace(newGroupPath);

// v6
const navigate = useNavigation();
...
navigate(`../${groupId}`)
```
- useHistory replaced by useNavigation see the example up
- useRouteMatch replaced by useMatch - useRouteMatch won't be required because of the relative pathing, but we relay on it for the tab navigation.


## What have to be refactored
### Routing
Migrate from using `Switch` to `Routes` and relative paths.
### Breadcrumbs
### Tabs navigation
