Migrating next app from [client -> ts-query + clerk -> supabase] to planetscale
Hi all, I'm migrating an app which used supabase's RLS with clerk's JWT to directly connect clients to a database.
I now would like to use planetscale but getting stun locked with the different options I have.
Ideally I want to keep data management on the client side (with tanstack query) so would it be best to just create a bunch of
Route Handlers
? There are about 9 queries and mutations.
Any input will be great thank you!1 Reply
Ohhhh server actions are perfect for this.
https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions
Data Fetching: Server Actions
Use Server Actions to mutate data in your Next.js application.