React hook for fetching streams that can be aborted.
npm install use-abortable-stream-fetchReact hook for fetching streams that can be aborted.
``bash`
yarn add use-abortable-stream-fetch
`javascript
import React, { useEffect } from 'react';
import useAbortableStreamFetch from 'use-abortable-stream-fetch';
const Logs = () => {
const url = '...';
const { data, error, abort } = useAbortableStreamFetch(url);
useEffect(() => {
dispatch(actions.processData(data));
}, [data]);
return
export default Logs;
``