1.0.0-b1 • Published 8 years ago
@jxnblk/fetch-component v1.0.0-b1
Fetch Component
React component for fetching data declaratively
<Fetch url='/users'>
{({ isFetching, data, error }) => (
isFetching
? <div>Fetching data...</div>
: error
? <div>Error: {error}</div>
: (
<div>
<pre>{JSON.stringify(data, null, 2)}</pre>
</div>
)
)}
</Fetch>