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

1.1.3 • Public • Published

use-count

CI Status

React Hook to use realtime countapi.xyz data and display it in your application.

Features

  • 📦 Tiny: use-count weighs in at less than 6.71 KB minified and gzipped.
  • 🌳 Universal: we dist esm and cjs modules.
  • 👨‍💻 Developer friendly: Helpful development messages that are stripped away in production
  • ⌨️ Strongly typed: use-count is written in TypeScript and encourages good practices this way

Installation

With NPM

npm i --save use-count

Or, with yarn:

yarn add use-count

Usage

import { useCount } from 'use-count';

const App = () => {
  const { value: hits } = useCount('namespace', 'key');

  return <p>{hits}</p>;
};

Package Sidebar

Install

npm i use-count

Weekly Downloads

0

Version

1.1.3

License

MIT

Unpacked Size

4.35 kB

Total Files

3

Last publish

Collaborators

  • zxffo