use-bv

1.0.1 • Public • Published

use-bv

A React hook that checks the visibility state of the browser window.

Installation

You can install the use-bv package using npm or yarn:

npm install use-bv
yarn add use-bv
import React from 'react';
import {useBrowserVisibility} from 'use-bv';

function MyComponent() {
  const { status, message } = useBrowserVisibility();

  return (
    <div>
      <p>Status: {status ? 'Open' : 'Minimized'}</p>
      <p>Message: {message}</p>
    </div>
  );
}

export default MyComponent;

Contributing Contributions are welcome! Please fork the repository and submit a pull request.

License This project is licensed under the MIT License - see the LICENSE file for details.

In this README file:

  • The Installation section provides instructions on how to install the package using npm or yarn.
  • The Usage section shows how to import and use the useBrowserVisibility hook in a React component.
  • The Contributing section encourages users to contribute to the project by submitting a pull request.
  • The License section provides information about the license under which the package is distributed.

You can customize this README file to better fit your package's specific features and usage.

Package Sidebar

Install

npm i use-bv

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

2.04 kB

Total Files

2

Last publish

Collaborators

  • robiulalamdev