@stellar-apps/fetcher

2.0.8 • Public • Published

@stellar-apps/fetcher

A useful set of components for fetching JSON data on both the client and server side.

Installation

yarn add @stellar-apps/fetcher

Usage

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>
  )
}

Readme

Keywords

none

Package Sidebar

Install

npm i @stellar-apps/fetcher

Weekly Downloads

22

Version

2.0.8

License

MIT

Unpacked Size

38.3 kB

Total Files

26

Last publish

Collaborators

  • jaredlunde
  • relytmcd