News for hackers. Stuff that matters.
Re:Beyond React 16 by Dan Ambramov – Async Rendering and Rea... by ty___ler on Thursday March 01, 2018 @03:12PM (#16495761)
I’m pretty excited to see how the api could interop with some new native features of js, like for ex async class functions are now possible and I bet a setup like this could remove a lot of IO overhead in the future

  class Test {
    async render() {}
  }
Kind of hard to come up with a concrete use-case with how little we know about the new features. Still super interesting though!
Re:Beyond React 16 by Dan Ambramov – Async Rendering and Rea... by alexeyraspopov on Friday March 02, 2018 @09:29AM (#16501550)
Interop with language feature is definitely a thing. It helps people to understand a tool without the need of digging into implementation details, since those details are language features that developers already familiar with.

There is a way to do this kind of things with current React version (16.2): https://github.com/alexeyraspopov/react-coroutine

You can use generators, async functions, and even more, async generators. Worth checking examples in the repo.

Re:Beyond React 16 by Dan Ambramov – Async Rendering and Rea... by ty___ler on Friday March 02, 2018 @01:11PM (#16504156)
Nice, awesome work!