New to Tanstack Query, Help me understand ,
new to tansatck query
i have a inventory management /payment / transaction settlement application on react + spring boot
as in this there are lots of tables , using tanstack table for them
and fetching data , all api calls done with axios
JWT token , have been intructed not to use cookies , currently stored in localstorage , havent used any state management libs too like redux zustand ,
just had a thought to shift to tanstack query , heard its good , caching and all stuff
im just a fresher , just graduated
Any suggestions
2 Replies
multiple-amethyst•3w ago
If your using Spring you can autogenerate swagger docs and use https://openapi-ts.dev/introduction with tanstack query to get sdk code generated and end to end typescript support
openapi-typescript | OpenAPI TypeScript
Quickstart
multiple-amethyst•3w ago
And your can use it alongside tanstack table, the docs will have examples
You mentioned using axios, but not query or swr so.... there in useEffects?
You should use query if your using useEffects, unless you have a react framework with its own data fetching opinions but this seems like a vite situation anyway