Using server actions or client side solutions to call external APIs
I recently came across this blog post by auth0. I am currently following this, but this like 2 steps of call, first call to the next.js server, then call to the external api server. It can also be done via client side libraries like tanstack-query. Are there any differences between the two aproaches apart from hiding api call details?
NextJS: Using Form to create button to trigger server action
I have a NextJS project using the app router and I need a button that deletes a cookie when clicked. I’m achieving this by creating a form
that contains only the button
so that way the sever action can be triggered via the button: