How to handle blocking UI elements while waiting for server response
Lately I've been using React + Formik to create great user experiences. I've a question about blocking the UI when the XHR is still processing.
Imagine a register form with only a sign up button. As soon as the button is clicked I disable the button, it show a loader and sets the cursor to default. All good so far.
In that same view of the webpage there is also a link to "Already have an account? Sign In!" (and a fiew other hrefs). The "Sign In!" part is an URL, which is still clickable. What do I do in this situation? Should I block the "Sign In" link from being clicked?
Because when the user clicks "Sign In!" when no response has been received yet from the backend it either returns 200 registering was successful and redirects. Or it returns a validation error in which case the component is unmounted and React gives errors.