Now the Correct way to handle for is useActionState()
const [state, formAction, isPending] = useActionState(upsertCarDetails, car)
Next.js Server Action's Pending State