A React Hook to handle exit intent strategies
npm install use-exit-intent> The Exit Intent strategy is a great way to increase your conversion rate. That strategy is commonly used to show a modal/popup when the user is about to leave your website.
- npm
``bash`
npm i use-exit-intent
`
- pnpm
bash`
pnpm i use-exit-intent
`
- yarn
bash`
yarn add use-exit-intent
In your React component:
`tsx
import { useExitIntent } from 'use-exit-intent'
export function App() {
const { registerHandler } = useExitIntent()
registerHandler({
id: 'openModal',
handler: () => console.log('Hello from handler!')
})
// ...
}
``
That said, there's a bunch of ways you can contribute to this project, like by:
- :beetle: Reporting a bug
- :page_facing_up: Improving this documentation
- :rotating_light: Sharing this project and recommending it to your friends
- :dollar: Supporting this project on GitHub Sponsors or Patreon
- :star2: Giving a star on this repository