Typically, this is how we define routing:
const routes = [
{
path: '/store',
component: Dashboard
},
{
path: '/store/products',
component: ProductsView
},
{
path: '/store/products/add',
component: ProductsAddView
},
]
I keep repeating the path /store
. Is there a way to simplify this by writing it only once?
I'm looking for a solution where I can instruct the router to render views if it finds /products or /products/add
after /store
, without having to write the entire path /store/products
every time.