🐠 A React Hook to handle exit intent strategies
MIT License
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.
In your terminal, run:
npm i use-exit-intent
pnpm i use-exit-intent
yarn add use-exit-intent
In your React component:
import { useExitIntent } from 'use-exit-intent'
export function App() {
const { registerHandler } = useExitIntent()
registerHandler({
id: 'openModal',
handler: () => console.log('Hello from handler!')
})
// ...
}
Note: contributions are always welcome, but always ask first, — please — before work on a PR.
That said, there's a bunch of ways you can contribute to this project, like by: