Closed ghost closed 3 years ago
The second request is made because, when scrolling fast enough, a scroll happens before areResultsLoading
in handleScroll
is set to true
by setAreResultsLoading(true)
in useEffect
in useBookSearch
. This is because useEffect
is asynchronous.
Closed because the effort required to fix this bug in the time left before the project deadline was not worth the benefit of the feature (as discussed with @jdmedlock).
Works, but more than one request is made (bug). Opening PR so this can be merged into development early if desired.