Imagine I have the following routes:
const routes = [{
id: "1",
path: "animals",
children: [{
id: "1.1",
path: "birds",
children: [{
id: "1.1.1",
path: "colibri",
element: <Colibri />
}]
}]
},
{
id: "1.2",
path: "reptiles",
...
}]
How can I use a hook like useMatches
or any other lookup method if I am only given a value like 1.1.1
to perform the lookup.