Capítulo 20 de 57
Code-based routing builds the same route tree as file-based routing but entirely in code via createRoute() and addChildren(); the docs explicitly discourage it for most apps in favor of file-based routing, though it supports every routing concept (index, dynamic, splat, layout, pathless, non-nested routes).
createRoute({ getParentRoute, path, ... }): Manually defines a single route; requires a reference to its parent route (getParentRoute) so TypeScript can propagate type safety down the tree, mirroring what createFileRoute's path string does automatically in file-based routing.createRootRoute(): Same root-route concept as file-based routing, created manually in code.addChildren(): Composes parent and child route objects together to explicitly assemble the nested route tree, since there's no filesystem structure to infer it from.path: '/'), dynamic segments ($param), splat routes ($ alone), layout routes, pathless layout routes (using id instead of path), and non-nested routes (declared with the full path from root) are all supported identically to file-based routing.createRoute/addChildren vs. files) changes.id property instead of the file-naming _ prefix convention.