1.0.6 • Published 5 years ago

@softbind/hook-use-idle v1.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

React Hooks

Installation

npm i @softbind/hook-use-idle --save

API

useIdle(ref, types)

Arguments

  • opt: Object: opt is a Object that you can pass. All props is available from activity-detector

Returns

  • idle: Boolean: Value that indicate when user is idle.
import { useIdle } from "@softbind/react-hooks";

const MyComponent = () => {
  const idle = useIdle({ timeToIdle: 1000 });

  return <div>Idle: {idle.toString()}</div>;
};
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago