News for hackers. Stuff that matters.
Re:Rich Harris joins Vercel to work on Svelte full time by wruza on Thursday November 11, 2021 @11:56PM (#29196421)
I’m neither of (react, vue, svelte) guy, but isn’t that snippet equivalent to some:

  div
    Await promise={mypromise}
      div Loading…
      {res => res.map(…)}
      div Error: {err => err.message}
(writing in pug-like because I can’t stand closing these tags on the phone)

Isn’t it easier in both react and vue to create Await component with children=(ifwaiting, ifresolved, ifrejected) than suffering all over the code?

Edit: I messed data flow up in the error handler, wontfix but you get the idea

There are no comments on this comment yet.