0.1.995 • Published 2 years ago

fast_fetch_react v0.1.995

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

FastFetch

Fast Fetch for Reactjs

Install

$ npm install fast_fetch_react

Usage

import FastFetch from "fast_fetch_react"

import React from "react";
 
function Categories() {

    const [loading, error, categories] = FastFetch("https://fakestoreapi.com/products/categories", null, 60 * 60 * 1000);//1H
    if (loading) return <p>Loading...</p>;
    if (error) return <p>Something went wrong...</p>;
    if (!categories)
        return '';
    return (
        <div className="App">
            <header className="App-header">
                <p>Categories:</p>
                <ul>
                    {categories ? categories.map(c => <li>{c}</li>) : ''}
                </ul>
            </header>
        </div>
    );
}

export default Categories;
0.1.96

2 years ago

0.1.97

2 years ago

0.1.98

2 years ago

0.1.99

2 years ago

0.1.91

2 years ago

0.1.92

2 years ago

0.1.93

2 years ago

0.1.94

2 years ago

0.1.95

2 years ago

0.1.994

2 years ago

0.1.995

2 years ago

0.1.992

2 years ago

0.1.991

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.0

2 years ago