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

FR: don't repeatedly interrupt users #6

Closed aa-jeremyhoover closed 9 months ago

aa-jeremyhoover commented 1 year ago

@daltonmenezes First off, great work on this library! Docs are amazing and it works as expected 🔥🔥🔥

I would like to prevent users from seeing the same exit intent content twice if they have explicitly closed out of the content. I see you have unsubscribe(), but that looks like it's intended for a site-wide use rather than per instance. I plan to add this feature to my app, would this be useful to have in the library itself?

Thanks!

daltonmenezes commented 1 year ago

Hi @aa-jeremyhoover , thanks and sorry for the delay! Sure, it would be awesome to have this feature! A PR will be appreciated!

aa-jeremyhoover commented 9 months ago

Closing because I didn't realize that this already exists by just setting a different cookie: { key } out of the box. 🤦 .