T
TanStack2y ago
vicious-gold

lazyRouteComponent or createLazyRoute

Which one is recommended?
3 Replies
passive-yellow
passive-yellow2y ago
One is for code based routing and one is for file based routing
vicious-gold
vicious-goldOP2y ago
Code Splitting | TanStack Router React Docs
Code splitting and lazy loading is a powerful technique for improving the bundle size and load performance of an application. Reduces the amount of code that needs to be loaded on initial page load
xenial-black
xenial-black2y ago
You can use createLazyRoute for the code-based approach. You'll basically be replicating the file-based routing approach but manually doing the connections using code-based.

Did you find this page helpful?