use-query
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

use-query

useState to fetch data

Install

npm install use-query or yarn add use-query

Example:

Default

import useQuery from 'use-query';
 
let { loading, data, error } = useQuery(async () => {
  return fetch('...');
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    143
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    143
  • 1.0.0
    0

Package Sidebar

Install

npm i use-query

Weekly Downloads

143

Version

1.0.2

License

MIT

Unpacked Size

8.9 kB

Total Files

9

Last publish

Collaborators

  • tannerlinsley