Skip to content

🎙 A simple React hook for detecting the use of an Ad Blocker by the user. Built-in TS support.

License

Notifications You must be signed in to change notification settings

heybereket/use-detect-ad-blocker

 
 

Repository files navigation

useDetectAdBlocker

🎙 A simple React hook for detecting the use of an Ad Blocker by the user.

Built with TypeScript (built-in type safety and support).

Installation

npm i use-detect-ad-blocker
# or
yarn add use-detect-ad-blocker

Usage

The following is an example of how you might choose to use this hook:

import { useDetectAdBlocker } from "use-detect-ad-blocker";

const Component = () => {
    const detectAdBlocker = useDetectAdBlocker();

    return {detect ? <Modal /> : <HomePage />}
}

Created and maintained with ❤️ by @FilippoFonseca.

About

🎙 A simple React hook for detecting the use of an Ad Blocker by the user. Built-in TS support.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 55.4%
  • JavaScript 44.6%