Northerncoder
Northerncoder6mo ago

useMutation vs server action & fetch mutation

I am building a signup page for my app (using lucia auth) and I am wondering what is the right pattern for submitting forms. My concern is if I need to rate limit the signup against bots, I wouldnt be able to do this using useMutation. Does it make sense to instead make a server action and in there use fetchMutation to submit a user signup?
1 Reply
Michal Srb
Michal Srb6mo ago
Yeah, you can make an action to rate limit via a Captcha.

Did you find this page helpful?