AthletiFi / athletifi-website

Official website for AthletiFi
https://www.athleti.fi
1 stars 5 forks source link

Optimization: Refactor API requests into server actions #332

Open chef-louis opened 1 week ago

chef-louis commented 1 week ago

Youtube reference: https://www.youtube.com/watch?v=RadgkoJrhu0

Would allow for quick/easy path revalidation. Also allows for leveraging NextJS caching.

Would clean-up / limit use of state management across the project.

This would make updating our front-end after back-end changes very easy to implement (ie. backend changes such as 'revoking' invite or 'sending invite' should update on the same page as the inviter). Current implementation uses a hard-refresh to update the screen with the latest backend state which is a poor user experience.