ReactJS - always abort fetch calls if you need to
Say you have the following custom hook:
export function useFectch(url){
const [loading, setLoading] = useState(true);
const [data, setData] = useState();
const [error, setError] = useState();
useEffect( () => {
setLoading(true);
fetc...
caffeinatedcode.hashnode.dev2 min read