T
TanStack4w ago
eastern-cyan

Server-side vs client-side validation

Which approach is better when working with Tanstack Start and Tanstack Form, is it server-side validation like the link bellow or client-side validation for authentication using Better Auth? https://tanstack.com/form/latest/docs/framework/react/guides/ssr In better auth docs, they recommend using auth client with Tanstack Start: We recommend using the client SDK or authClient to handle authentication, rather than server actions with auth.api while with Next.js, they recommend using server actions and RSC: The api object exported from the auth instance contains all the actions that you can perform on the server. Every endpoint made inside Better Auth is a invocable as a function. Including plugins endpoints. How should I go with it?
React Meta-Framework Usage | TanStack Form React Docs
TanStack Form is compatible with React out of the box, supporting SSR and being framework-agnostic. However, specific configurations are necessary, according to your chosen framework. Today we support...
1 Reply
fair-rose
fair-rose4w ago
while TanStack Form supports both SSR and Client-side validation, more focus is given to client-side since it's the quicker feedback. There's also more documentation on it than the SSR sections currently

Did you find this page helpful?