Can anyone suggest the best way to set up routing in Next.js for only Home
, Gallery
, and Contact us
? Should I use dynamic routing or just keep it basic? Any ideas on how to path them? I'm still learning, so I would appreciate some guidance. I've looked at some articles online, but they mostly focus on home and about pages. Any recommendations for Nuxt.js or any related articles I can refer to?
Is it correct not to create Vue.use(router) in any component files within the webpack of Nuxt.js?
Would this routing setup be appropriate?
router: {
routes: [
{
name: 'index',
path: '/',
component: 'pages/index.vue'
},
{
name: 'About',
path: '/About',
component: 'pages/about/index.vue'
},
{
name: 'Contact-us',
path: '/user/contact',
component: 'pages/user/contact.vue'
}
]
}
If there are any mistakes, please let me know so that I can correct them.