Best way to handle loading spinner using server actions with revalidatePath
Unanswered
Chub mackerel posted this in #help-forum
Chub mackerelOP
Basically something which I use often is useTransition hook to wrap the server action call when using them with revalidatePath, is this the correct way ?
Also what about other React hooks like useFormStatus , useActionState ? or they cannot be used outside form components or when using revalidatePath in server action ?
It is very confusing to understand all these hooks their difference and when to use when in a Next.js React web app
Also what about other React hooks like useFormStatus , useActionState ? or they cannot be used outside form components or when using revalidatePath in server action ?
It is very confusing to understand all these hooks their difference and when to use when in a Next.js React web app