Make 2nd API calls when all contents are loaded (lazy loading) from the first API call in React js
问题 I have some .json files. I need to show all the data from the first .json file in browser as lazy loading.I need to make API call to the second .json when all contents are loaded from the first .json file (when user scoll to end of the page) . I should not make all API call at a time. How to do this using react js. 回答1: Make use of javascript scroll eventListener and calculate the window scroll height in order to trigger the async call. Please bind the necessary method in the constructor and