getRouteApi() Best Practices
getRouteApi('route/here') to access the router from outside the route definition. My concern here is if used incorrectly (outside of the route/here route tree), wouldn’t we see this not work/throw an error? I understand that this is more of a code quality/user error concern rather than a bug, similar to trying to access a React Context from outside of its Provider. Are there any guard rails you can set up to prevent this from happening?I saw a few similar posts about getting the errors I am talking about, but wondering if there is a better guardrail than
shouldThrow: false