Reactjs – How to fix react-hooks/exhaustive-deps error
I met react-hooks/exhaustive-deps lint error warning. Here is my code const fetchData = async pageNumber => { if (pageNumber > totalPages) { return; } try { setIsLoading(true); // ... call api const content = response.data.content; if (pageNumber === 1) {…