Comment

Comment by skywal_l

Behind async there is a real actual hardware reality. Accessing local storage (or the network) is slow and you do not want to block your UI.

You say async were all over the place. Either it makes sense because fundamentally, what you are doing IS asynchronous. Or it make no sense because the asynchronous nature of you calls are not important in your design (I don't see why but ok), in that case you can always break the chains by using a promise:

    async bar() {
      return await baz();
    }

    foo() {
      const promise = bar();
      promise.then(() => {}); // don't care...
    }
parent skywal_l 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton