[SOLVED] Does validateSearch not work with createLazyFileRoute?
I'm learning how to do redirects, and I'd like to place a redirect search param on one of my routes. I'm coming across an error stating
I've restarted my editor and this is still the case, is validateSearch simply not possible with createLazyFileRoute?
3 Replies
rival-black•2y ago
Yeah, if you need
validateSearch you should put it in a createRouteFile to defined the search and everything in a none lazy file and then use it on the lazy file.rival-black•2y ago
Code Splitting | TanStack Router 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

extended-salmon•2y ago
Yep. Lazy files can only define components for now
Everything else is considered critical and thus needs to be sync