TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Sneak Peek: Beyond React 16 [video]

89 pointsby montogeekabout 7 years ago

4 comments

aeontechabout 7 years ago
Video of Dan Abramov&#x27;s demo here: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=v6iR3Zk4oDY" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=v6iR3Zk4oDY</a><p>and associated HN discussion here: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16492973" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16492973</a>
评论 #16495485 未加载
评论 #16494924 未加载
egeozcanabout 7 years ago
As far as I understand:<p>If you throw a promise (throw as in throwing an error) from the render function, React will retry when it resolves. `createFetcher` is a cache layer so that you don&#x27;t DOS your own server on re-renders. Maybe though encouraging people use a ServiceWorker for that would have made more sense (edit: it also throws the promise for you when you access the cached value. so, yeah, it is very well-thought indeed).<p>Apart from that, this seems to be very simple to use, well-thought and useful.
评论 #16495764 未加载
daverobertsabout 7 years ago
This is very cool. I&#x27;m heavily invested in Vue.js, but seeing these kinds of features of the horizon with React makes me a bit jealous.<p>The APIs do see unintuitive, but as Dan said, they are not finalized yet. I remember trying to implement a drag and drop component in React and having a bit of trouble with complicated APIs. Hopefully this keeps getting cleaner.
vga805about 7 years ago
I&#x27;m eager to play with this and to try out some ideas.<p>For example, I wonder if it&#x27;s possible to pass createFetcher an async function that awaits a fetch, dispatches a redux action with the data as a payload, then returns the data. If create fetcher works this way, it would seem to obviate a bunch of the usual redux actions. instead of FETCH_DATA, FETCH_DATA_SUCCESS, and FETCH_DATA_FAILURE, you could just have something like SET_DATA.