python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
custom react hook returns default value in initial render
I made a hook for intersection observer but it is returning state as false in initial render and then returning true.
my element is 100% visible to observer but I don't know why it is returning false ...
muller
Votes: 0
Answers: 1
custom hook returns wrong value
I made a custom hook as my intersection observer but I'm getting false and true state at the same time and twice!, first false(twice) and second true(twice) why is this happening? why state changes it...
muller
Votes: 0
Answers: 1
Load all images when intersection observer is not supported
I'm using intersection observer for late loading images.
How can I load all images in browsers that don't support intersection observer?
My script=
const imob = new IntersectionObserver((entries, self...

awakening
Votes: 0
Answers: 1
Why is functional component nested function using a stale state value?
My component fetches and displays posts using infinite scrolling (via an IntersectionObserver). The API call that the component makes is dependent on the current number of fetched posts. This is passe...
Alex T
Votes: 0
Answers: 1