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.
To install the package, use npm:
pnpm add use-exit-intent3
yarn install use-exit-intent3
npm install use-exit-intent3
import { useExitIntent } from 'use-exit-intent3';
const exiting = useExitIntent();
console.log(exiting ? 'YES' : 'NO');
Bundle your TypeScript library with no config, powered by esbuild.
- install dependencies
# pnpm
$ pnpm install
# yarn
$ yarn install
# npm
$ npm install
- Add your code to
src
- Add export statement to
src/index.ts
- Test build command to build
src
. Once the command works properly, you will seedist
folder.
# pnpm
$ pnpm run build
# yarn
$ yarn run build
# npm
$ npm run build
- Publish your package
$ npm publish