I am using useInView() hook to monitor a component, and whenever the component is InView , I perform some operation. I am writing UT's for this component and I want to test both the cases i.e. when the component is inView or not. Can anyone suggest how can we mock useInView() to test both the cases.
Asked
Active
Viewed 105 times