News for hackers. Stuff that matters.
Re:Create React App 4.0 by dbbk on Saturday October 24, 2020 @06:33AM (#24878261)
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.

There are no comments on this comment yet.