Closed anthipapa closed 3 years ago
Yes, the watcher has a destroy
method, that turns it off permanently. If you want to bring it back after then you can create a new one. you can also elementWatcher.one('exitViewport', () = {})
to run the function once but keep the watcher alive.
https://github.com/stutrek/scrollmonitor/blob/master/README.md#methods
Hello! I have this function
which is tied to a componentDidMount one on
I wanted to know if there is a way to turn of the watcher after just one console.log because now it returns a lot of logs! I saw an issue about an .off options but I couldn't find anything in the documentation. Thanks!!