Skip to content
Snippets Groups Projects
Commit 93666a8d authored by Maximilian Leo Huber's avatar Maximilian Leo Huber
Browse files

fixed fade

parent 590e759f
No related branches found
No related tags found
No related merge requests found
Pipeline #423097 failed
import React, { useEffect, useRef } from "react";
export function Home() {
{/* debug */}
const [ isVisible ] = React.useState();
const [isVisible, setVisible] = React.useState(false);
const domRef = useRef(null)!;
useEffect(() => {
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => setVisible(entry.isIntersecting));
{/* debug */}
entries.forEach(entry => console.log(entry.isIntersecting));
});
observer.observe(domRef.current!);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment