@mojitonft/hooks
TypeScript icon, indicating that this package has built-in type declarations

1.0.5-alpha.5 • Public • Published

A high-quality & reliable React Hooks library.

Features

  • Easy to learn & use
  • Contains a large number of advanced Hooks that are refined from business scenarios
  • Written in TypeScript with predictable static types

📦 Install

$ npm install --save @mojitonft/hooks
# or
$ yarn add @mojitonft/hooks

🔨 Usage

import { MojitoHooksProvider, onErrorCallback, useServerTime  } from '@mojitonft/hooks';

onErrorCallback((e) => {
  // Log error to Sentry or anywhere you'd like:
  console.error(e);
});

const Component: React.FC = () => {
  const data = useServerTime();

  return <pre>{ JSON.stringify(data, null, '  ')}</pre>;
};

const App: React.FC = () => {
  return (
    <MojitoHooksProvider>
      <YourComponent />
    </MojitoHooksProvider>
  );
};

Package Sidebar

Install

npm i @mojitonft/hooks

Weekly Downloads

29

Version

1.0.5-alpha.5

License

none

Unpacked Size

1.21 MB

Total Files

346

Last publish

Collaborators

  • ekuznetski-mojito
  • danmojitomac
  • danziger
  • veljko-mojito
  • petersng