A hook to simplify integration of ActiveStorage with React
npm install react-activestorage



``bash`
npm install react-activestorage
`tsx
import { useActiveStorage } from "react-active-storage";
const Example = () => {
const form = useRef
const [file, setFile] = useState
const { uploading, progress } = useActiveStorage(
file,
async ({ blob, error }) => {
if (blob) console.log(blob.signed_id);
setError(error);
setFile(undefined);
form.current?.reset();
},
);
return (