Route props order
just out of curiosity:
why is there a specific order that props should follow in the
createFileRoute object. For example, params and loaderDeps should be passed before loader. I know it should be evaluated in that order probably, but is there a specific reason for passing them in order too, other than encouraging a convention?3 Replies
robust-apricot•4d ago
the order is meant to ensure typescript can infer the correct types from the correct props
robust-apricot•4d ago
that's why there is a dedicated ESLint plugin https://tanstack.com/router/latest/docs/eslint/eslint-plugin-router
ESLint Plugin Router | TanStack Router Docs
TanStack Router comes with its own ESLint plugin. This plugin is used to enforce best practices and to help you avoid common mistakes. Installation The plugin is a separate package that you need to in...
modern-tealOP•4d ago
thanks!