T
TanStack11mo ago
ambitious-aqua

Is there an equivalent of React-Router's Action/Fetcher model?

I really like how React-Router lets you write an action that can take formdata or JSON from a Request, and call it from the client. It reduces a tonne of boilerplate. Is there anything similar to this for Tanstack Router? I guess Start will cover it to some extent with API/RPC routes, but I'm more interested in being able to do it on the client.
3 Replies
molecular-blue
molecular-blue11mo ago
i guess the closest equivalent in tanstack start will be server function https://tanstack.com/router/latest/docs/framework/react/start/server-functions
TanStack | High Quality Open-Source Software for Web Developers
Headless, type-safe, powerful utilities for complex workflows like Data Management, Data Visualization, Charts, Tables, and UI Components.
From An unknown user
From An unknown user
fair-rose
fair-rose10mo ago
are server functions stable enough to use in an applciation?
fascinating-indigo
fascinating-indigo10mo ago
start is still in alpha but we don't expect them to change much now that middlewares have landed

Did you find this page helpful?