@alobato/use-fetch

1.0.2 • Public • Published

useFetch

React hook for fetching json data

Note: This is using the new React Hooks API

You'll need to install react, react-dom, etc at ^16.8.0 or above

Install

yarn add @alobato/usefetch

Usage

import useFetch from '@alobato/usefetch'

const { data, error, loading } = useFetch('https://api.github.com/repos/alobato/usefetch')

/@alobato/use-fetch/

    Package Sidebar

    Install

    npm i @alobato/use-fetch

    Weekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    2.72 kB

    Total Files

    4

    Last publish

    Collaborators

    • alobato