daltonmenezes / use-exit-intent

🐠 A React Hook to handle exit intent strategies
https://use-exit-intent.daltonmenezes.com
MIT License
83 stars 6 forks source link
exit-intent hook library nextjs react typescript

preview

useExitIntent: 🐠 A React Hook to handle exit intent strategies

github url patreon url releases url license url

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.

🐠 Features

🐠 Installation

In your terminal, run:

🐠 Usage

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!')
  })

  // ...
}

🐠 Knowledge

🐠 Contributing

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:

License

MIT © Dalton Menezes