retry logic with server action

How do you implement retry logic with server action? I'm using next-safe-action if that matters.
1 Reply
Spaceman
Spaceman7mo ago
Honestly if you need to retry, I would use something like https://www.npmjs.com/package/swr which has polling and then put your logic into a api endpoint. I think retrying is sort of outside the behavior scope for a form submit.
npm
swr
React Hooks library for remote data fetching. Latest version: 2.2.5, last published: 3 months ago. Start using swr in your project by running npm i swr. There are 1344 other projects in the npm registry using swr.
Want results from more Discord servers?
Add your server