IPFS provider for a react application.
npm install --save @shop3/react-ipfs
import React, { useEffect } from 'react';
import { IPFSProvider, useIPFS } from '@shop3/react-ipfs';
const App = () => {
return (
<IPFSProvider>
{/* app here */}
</IPFSProvider>
)
}
const Example = () => {
const ipfs = useIPFS();
useEffect(() => {
if (ipfs) {
// use ipfs here
}
}, [ipfs]);
}
npm install
npm run husky:install
npm run develop