在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:revolunet/react-orbitdb开源软件地址:https://github.com/revolunet/react-orbitdb开源编程语言:JavaScript 97.5%开源软件介绍:react-orbitdbreact hooks and providers for dealing with IPFS orbit-db datasources. You can see a demo here : https://revolunet.github.io/react-orbitdb Provider
import { OrbitProvider } from "react-orbitdb";
const App = () => <OrbitProvider>...</OrbitProvider>;
HooksuseOrbitDb
import { useOrbitDb } from "react-orbitdb";
const MyCmp = () => {
const { db, records } = useOrbitDb("/orbitdb/somehash/my-db, {
create: true,
type: 'eventlog'
});
return (
<div>
{records &&
records.map((record) => <div key={record.id}>{record.message}</div>)}
</div>
);
};
useOrbit
useIpfs
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论