Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5193 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5193 Rev 5196
Línea 19... Línea 19...
19
      observer.observe(ref.current)
19
      observer.observe(ref.current)
20
    }
20
    }
21
    return () => {
21
    return () => {
22
      observer.unobserve(ref.current)
22
      observer.unobserve(ref.current)
23
    }
23
    }
24
  }, [isIntersecting]) // Empty array ensures that effect is only run on mount and unmount
24
  }, [isIntersecting, ref]) // Empty array ensures that effect is only run on mount and unmount
Línea 25... Línea 25...
25
 
25
 
26
  return [isIntersecting, reset]
26
  return [isIntersecting, reset]
Línea 27... Línea 27...
27
}
27
}