Help to understand the need to `getParentRoute`
Why is the need to use
getParentRoute when defining the new Route()?
Since I'm adding .addChildren could that be inferred, like indexRoute after that point knows that its parent is the rootRoute?2 Replies
genetic-orange•3y ago
Afaik it's only for TypeScript and typesafety so it can infer parent route context/loader etc
sunny-greenOP•3y ago
hum ok, that makes sense. Thank you.
Since I'm using a file structure with features, it will be nice if each feature creates its own routes and only the root imports them, without the need to infer the parent, but it's ok, I can use a function creator that receives an argument that is the parent route.