Using tanstack to make a post request
How can I use tanstack to make a post Request?
1 Reply
conventional-tan•8mo ago
Well, if you want to call another server just do it like you would normally on any other react project.
You can look at the starter pack with tanstack\query and use query to make api call and cache them.
https://stackblitz.com/github/tanstack/router/tree/main/examples/react/start-basic-react-query?embed=1&theme=dark&preset=node&file=src/main.tsx
StackBlitz
Router Start Basic React Query Example - StackBlitz
Run official live example code for Router Start Basic React Query, created by Tanstack on StackBlitz