0.1.995 • Published 3 years ago
fast_fetch_react v0.1.995
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
3 years ago
0.1.97
3 years ago
0.1.98
3 years ago
0.1.99
3 years ago
0.1.91
3 years ago
0.1.92
3 years ago
0.1.93
3 years ago
0.1.94
3 years ago
0.1.95
3 years ago
0.1.994
3 years ago
0.1.995
3 years ago
0.1.992
3 years ago
0.1.991
3 years ago
0.1.8
3 years ago
0.1.7
3 years ago
0.1.6
3 years ago
0.1.5
3 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.0
3 years ago