You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I might be missing something obvious, but neither the docs or the code examples show how to actually handle the happy path:
the server action processes the form data and returns a success message:
...
// Your form has successfully validated!
const result = await saveToDb(validatedData)
// how to make this part of the data model being passed between server and client?
return { isSuccess: true}
the client side code is notified about it and confirms to the user:
// where and how to check this?
if(state.isSuccess === true){
console.log('Saved')
}
can anybody please point me to some more detailed examples on how to achieve this in a TanStackForm-way?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm looking into how to take in use TanStack Form into a Next.js app using server actions:
I might be missing something obvious, but neither the docs or the code examples show how to actually handle the happy path:
can anybody please point me to some more detailed examples on how to achieve this in a TanStackForm-way?
Beta Was this translation helpful? Give feedback.
All reactions