Skip to content

Instantly share code, notes, and snippets.

@jamesplease
Last active February 28, 2018 21:18
Show Gist options
  • Save jamesplease/521079be3b0f0d81bd711e789a2d7f83 to your computer and use it in GitHub Desktop.
Save jamesplease/521079be3b0f0d81bd711e789a2d7f83 to your computer and use it in GitHub Desktop.
import Composer from 'react-composer';
import Component from 'react-component-component';
<Composer
components={[
<Fetch {...fetchProps} />,
([firstResult]) => {
// Ultimately, you return a Fetch that is lazy.
//
// When `firstResult` changes from `loading` to succeeded,
// you call `doFetch`
}
]}
/>
{(results) => {}}
</Composer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment