New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@react-hookbox/event-callback

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-hookbox/event-callback

Material UI's useEventCallback with better type definitions.

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

@react-hookbox/event-callback

Material UI's useEventCallback with better type definitions.

NPM Minzipped Bundle Size

Install

npm install --save @react-hookbox/event-callback

or

yarn add @react-hookbox/event-callback

Usage

both for JavaScript and Typescript:

import { useEventCallback } from '@react-hookbox/event-callback';
// OR
// import useEventCallback from '@react-hookbox/event-callback';

// then
const myCallback = useEventCallback((num, str) => {
  return str.repeat(Math.min(num, 2));
});

useEventCallback updates the callback it's using after an "effective-time". So make sure to use it as a callback or in a useEffect which is placed after useEventCallback;

Params

  • fn. This is a required function parameter. The returned value will have the same type.

    Note: The return value will be updated after an "effect-ive time".

    That means the returned value should be used as an event callback or in an event callback.

License

MIT © hakobpogh

Keywords

@react-hookbox

FAQs

Package last updated on 15 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts