Skip to content

Commit

Permalink
Fixed deferred loader
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Jan 12, 2024
1 parent ecc117f commit 3b50fff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/demo/DeferredDemo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useRef, useState } from 'react';
import { useEffect, useRef, useState } from 'react';

const DeferredDemo = ({ options, children, onLoad }) => {
const [visible, setVisible] = useState(false);
Expand All @@ -7,7 +7,7 @@ const DeferredDemo = ({ options, children, onLoad }) => {
const observerRef = useRef(null);
const elementRef = useRef(null);

/*useEffect(() => {
useEffect(() => {
const handleIntersection = ([entry]) => {
clearTimeout(timeoutRef.current);

Expand All @@ -33,7 +33,7 @@ const DeferredDemo = ({ options, children, onLoad }) => {

clearTimeout(timeoutRef.current);
};
}, [visible, onLoad, options]);*/
}, [visible, onLoad, options]);

return (
<>
Expand Down

1 comment on commit 3b50fff

@vercel
Copy link

@vercel vercel bot commented on 3b50fff Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

primereact – ./

primereact-git-prod-primetek.vercel.app
primereact-primetek.vercel.app
primereact.org

Please sign in to comment.