react-hook-fetcher

1.0.1 • Public • Published

React Hook Fetcher

React simple fetch API hook

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

Readme

Keywords

none

Package Sidebar

Install

npm i react-hook-fetcher

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

2.21 kB

Total Files

3

Last publish

Collaborators

  • bluebill1049