Next.js Discord

Discord Forum

What are the advantages of Parallel Routes?

Unanswered
Erythrina gall wasp posted this in #help-forum
Open in Discord
Erythrina gall waspOP
While the method of rendering multiple routes in parallel with Parallel Routes seems similar to the traditional way of arranging components, what are the advantages? I don't see the benefit of placing multiple like this:

export default function DashboardLayout({
  children,
  analytics,
  reports,
  notifications,
}: {
  children: React.ReactNode,
  analytics: React.ReactNode,
  reports: React.ReactNode,
  notifications: React.ReactNode,
}) {
  return (
    <div>
      <div>{children}</div>
      <div>{analytics}</div>
      <div>{reports}</div>
      <div>{notifications}</div>
    </div>
  );
}


However, I do find the implementation of modals with Parallel Routes to be convenient.

0 Replies