Skip to content

Instantly share code, notes, and snippets.

@jamesplease
Last active April 14, 2018 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesplease/37c39c6d1c127c86b9f3d0d77c4f30e3 to your computer and use it in GitHub Desktop.
Save jamesplease/37c39c6d1c127c86b9f3d0d77c4f30e3 to your computer and use it in GitHub Desktop.

First, we start out with all null data. No responses have been received.

[null, null, null]

Then, a response returns:

[resOne, null, null]

Sometime later, all of the data has been returned:

[resOne, resTwo, resThree]

This requires a streaming API to implement, so callbacks and Promises are out of the question. The elements are being updated, unless they resolve to getters.

fetcher('thing');

Who do I see being the consumer of fetcherComposer? Probably the component, right?


React Fetcher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment