3 ms·
Next doesn’t support nested routes and layouts. So if you have, for example, a page that has a a sidebar for a master/detail view, when you load the nested page
by dbbk 6y ago
Next doesn’t support nested routes and layouts. So if you have, for example, a page that has a a sidebar for a master/detail view, when you load the nested page it blows away the whole DOM and has to render the whole page again, meaning you lose your scroll positions and anything else you want to persist across pages.
React Router on the other hand lets you render subroutes directly into an ‘outlet’, maintaining the DOM state outside of it.
This is a super common pattern when you’re building something like an admin dashboard app which I do often.