News for hackers. Stuff that matters.
Re:React Concurrent Mode by jbaudanza on Thursday October 24, 2019 @08:14PM (#21350492)
The new suspense API works by throwing Promises when the data isn't ready yet.
Re:React Concurrent Mode by erikpukinskis on Sunday October 27, 2019 @12:59PM (#21370900)
I’m not sure what you mean by “throwing promises”...

You mean returning unresolved promises? Or returning rejected promises? Or just throwing an error?

Re:React Concurrent Mode by acemarke on Monday October 28, 2019 @11:39AM (#21377915)
Literally, _throwing_ a Promise.

React will catch promises thrown during rendering, and treat that as a request to "suspend" the component and come back to it later once the promise has resolved.