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'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.
This is very cool. I'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.
I'm eager to play with this and to try out some ideas.<p>For example, I wonder if it'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.