reagent-project / reagent

A minimalistic ClojureScript interface to React.js
http://reagent-project.github.io/
MIT License
4.74k stars 411 forks source link

React 16 "Suspense" #348

Open lilactown opened 6 years ago

lilactown commented 6 years ago

Starting a discussion on some of the new features coming down in React 16, that were shown in Dan Abramov's talk at JSConf: https://www.youtube.com/watch?v=v6iR3Zk4oDY

Blog post for people who don't want to sit through the talk (it's REALLY good tho!): https://reactjs.org/blog/2018/03/01/sneak-peek-beyond-react-16.html

Basically, the feature builds on top of React 16's new error handling features to create a way of "suspending" rendering on a component-by-component basis, so that components can wait on e.g. network requests to resolve.

I think that this is a really excellent way of moving the scheduling concerns that previously had to handled in a global fashion (e.g. Redux, re-frame, r/atom, etc.) to the component level.

I'd like to understand how this could work within Reagent. Once React 16.3 alpha rolls out I intend to do some experiments, but wondering if maintainers have any initial thoughts on the info we have now.

dustingetz commented 5 years ago

@Lokeh , did you ever investigate this and if so what did you find?