Skip to content

Instantly share code, notes, and snippets.

@daveols
Last active July 6, 2018 03:01
Show Gist options
  • Save daveols/11da644d22c6965f47b28aec343a7993 to your computer and use it in GitHub Desktop.
Save daveols/11da644d22c6965f47b28aec343a7993 to your computer and use it in GitHub Desktop.
React Loads - with provider
import { LoadsProvider } from 'react-loads'
const Bacon = () => (
<Loads cacheKey='bacon' fn={getBacon}>
...
</Loads>
)
const App = () => (
<LoadsProvider>
<Bacon />
</LoadsProvider>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment