You dont need API routes anymore

Next.js requires API routes to query databases from client components, adding an extra layer of indirection. TanStack Start offers server functions as an alternative solution—these functions can be called from client components but execute only on the server, allowing direct database access without creating separate API routes.

16 Comments

Sort: