Use case: There is a toggle button a user can click on it. After the user clicked on it, it should show a result, success or failure. It takes some process time to calculate the result. Unless error happens, it should always give success result.
Which of the following is a better user experience after the user clicks the toggle button?
Show success as a temporary result, and if the process errors out later, revert the success result to failure. Should the toggle button be disabled while it is still processing the result? If it is not disabled, the user can keeps clicking the toggle button, what to do in that situation?
Show a loading indicator, and then show the result after the process gives the result. Should the toggle button be disabled while it is still processing the result and the loading indicator is present?