I need to trigger the updatePosition function when the mouseMove event occurs on the document, but not when it is emitted from the testEl.current element:
const cursor$ = fromEvent<MouseEvent>(document, 'cursor')
const scroll$ = fromEvent(document, 'scroll').pipe(throttleTime(50))
const mousemove$ = fromEvent<MouseEvent>(document, 'mousemove')
const stickymove$ = fromEvent<MouseEvent>(testEl.current, 'mousemove')
const stickyenter$ = fromEvent<MouseEvent>(testEl.current, 'mouseenter')
const stickyleave$ = fromEvent<MouseEvent>(testEl.current, 'mouseleave')
mousemove$.pipe(subscribeOn(animationFrameScheduler), takeUntil(stickyenter$)).subscribe(event => updatePosition(event))
mousemove$.pipe(subscribeOn(animationFrameScheduler), skipUntil(stickyleave$)).subscribe(event => updatePosition(event))