A useful set of components for fetching JSON data on both the client and server side.
yarn add @stellar-apps/fetcher
import * as Fetcher from '@stellar-apps/fetcher'
export default function App () {
return (
<Fetcher.FetcherProvider>
<Fetcher.Fetch>
{({status, response}) => status !== 'done' ? status : (
JSON.stringify(response.data)
)}
</Fetcher.Fetch>
</Fetcher.FetcherProvider>
)
}