Switch content sidebar on nextjs

about 2 years ago - Direct link

Hi community, I'm creating a kind of "Dashboard" in nextjs and on the left side I have a bar with some categories, my doubt is very specific, what is the best way to show the content of each category? could I create a component arrangement ?


const myComponents = [ , , .... ]

and through a state to access those components, I know it works but I don't know if this is a good practice or if it is better to create a path for each category and only use the dashboard layout

Any examples you can provide?


Go to article →