Parallel Routes vs conditional rendering
Answered
Jumbo flying squid posted this in #help-forum
Jumbo flying squidOP
Hello! What's the advantages to using parallel routes to create dynamic UI components (for example a dashboard that displays differently depending on a user's role) vs creating those components in a private folder ,importing, and rendering depending on user role?
7 Replies
Jumbo flying squidOP
I'm specifically trying to decide how our UI gets split depending on user role and trying to understand if parallel routes is the way to go.
@Jumbo flying squid Hello! What's the advantages to using parallel routes to create dynamic UI components (for example a dashboard that displays differently depending on a user's role) vs creating those components in a private folder ,importing, and rendering depending on user role?
you can use both. It's a developer preference
Answer
Jumbo flying squidOP
it seems that if i dont need sub pages in those parallel routes, I can just go with the basic implementation. But if I need to support sub pages based on the parent routes. Then parallel routes will bet he way to go?
yes
Jumbo flying squidOP
cool makes sense thank you!
happy to help