Hi,
I am using get method in useeffect.every time i open the page this error will appear
useEffect(() => {
async function fetchMyAPI() {
let isSubscribed = true
axios
.get(`${BASE_URL}${endpoint}`, {
headers: {
Authorization: `bearer ${accesstoken}`,
},
})
.then(({data}) => {
if (isSubscribed) {
setFilteredDataSource(data);
}
});
fetchMyAPI()
return () => isSubscribed = false
}, [])