Title. Basically the first press seems to do nothing but the second press actually subscribes. Why is this?

  • masterspace@kbin.social
    link
    fedilink
    arrow-up
    6
    ·
    2 years ago

    I could be wrong but I think the first click works, there’s just no loading indicator, so then you click a second time because it’s unclear if anything is happening, and then shortly afterwards the successful response from the first click comes back and it just looks like the second click did something.

      • masterspace@kbin.social
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        The simplest standard fix is to just immediately start a loading spinner that disables the button until the first request comes back or times out, then at least the user knows that something is happening. Some sites use optimistic updating though where they just assume the request will be successful, benefit being that the change happens as soon as the user clicks the button but the downside is that it may change later if the request happens to error out for some reason.