4 ms·
The version control analogy in the description was spot on, but a good demo is worth a thousand words, so I will be waiting for a good demo to make conclusions.
by EastSmith 7y ago
The version control analogy in the description was spot on, but a good demo is worth a thousand words, so I will be waiting for a good demo to make conclusions.
- throwaway_bad 7y agoThe clearest demo that communicates what this solves was given when it was announced last year. That clock animation is pure genius: https://youtu.be/nLF0n9SACd4?t=473 https://youtu.be/nLF0n9SACd4?t=473
- gmaster1440 7y agoThis CodeSandbox seems relatively instructive: https://codesandbox.io/s/frosty-hermann-bztrp https://codesandbox.io/s/frosty-hermann-bztrp
- jbaudanza 7y agoThis demo is helpful. One thing that stands out is that fetchProfileData is made in the global scope. I presume (I hope) that it will be possible to do this from include an useEffect hook instead.
- the_duke 7y agoI think CPU branch prediction would be a better analogy. But version control is a lot more approachable.
- danabramov 7y agoIt might be asking a lot but to form the right impression, I would really suggest that you get through these docs: 1. https://reactjs.org/docs/concurrent-mode-suspense.html https://reactjs.org/docs/concurrent-mode-suspense.html 2. https://reactjs.org/docs/concurrent-mode-patterns.html https://reactjs.org/docs/concurrent-mode-patterns.html I spent the last 48 hours writing them, and I think they answer your questions and contain many, many demos.
- koolba 7y agoI'm still working my way through the suspense doc (very nice so far...) so please bear with this "in flight" thought. Does having an external state tracking system like Redux combined with a tracking a "loading state" solve the in-flight rendering item? My initial take is that this allows for a simplified model where data is loaded directly in components without the wrapping dance for tracking client load status.
- danabramov 7y agoThe meat of this thing is in the 'Patterns' doc. That's the kind of stuff Redux isn't equipped to do.