Re:React Concurrent Mode
by kylehardgrave on Friday October 25, 2019 @03:41PM
(#21358518)
Maybe I just missed this, but I couldn't find any kind of guidance for library maintainers on implementing Suspense. Reading the demo code + React-Cache it seems that it's basically about providing an interface that throws unresolved promises, but is there any more detailed documentation?
[ Parent
| on HN ]
Re:React Concurrent Mode
by danabramov on Saturday October 26, 2019 @10:23PM
(#21367525)
We'll likely add more documentation about this -- however, indeed, the contract fits in those 10 lines. There's not much more that's needed on the integration side.
The real questions (where and for how long do you cache, what triggers are fetch, how to avoid waterfalls) are something that the library itself is better positioned to answer and figure out. We don't have a particular suggestion there (although the docs mention our recommendation).