1.0.1 • Published 3 years ago

react-hook-fetcher v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

React Hook Fetcher

Simple React hook for the fetch API.

Intall

$ npm install react-hook-fetcher

Example

function App() {
  const {
    fetcher,
    result,
    isLoading,
  } = useFetcher();

  useEffect(() => {
   fetcher('http://http://google.com.au/')
  }, []);

  return <div>{isLoading ? 'Loading...' : result}</div>;
}