1.0.24 • Published 1 year ago
@meteor-web3/hooks v1.0.24
Meteor Hooks
Overview
This repository contains React
hooks for meteor primitives, making it
easier to create your dApp logic and components.
Install
pnpm install @meteor-web3/hooks
Example
import provider
import { MeteorContextProvider } from "@meteor-web3/hooks";
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<MeteorContextProvider>
<App />
</MeteorContextProvider>
);
use store
import { useStore } from "@meteor-web3/hooks";
const { state } = useStore();
use hooks
const { connectApp } = useApp({
onSuccess: (result) => {
console.log("connect app success, result:", result);
},
});
const { createdStream: publicPost, createStream: createPublicStream } = useCreateStream({
streamType: StreamType.Public,
onSuccess: (result: any) => {
console.log("create public stream success:", result);
},
});
You can find more meteor-hooks usage in dapp-examples.
Documentation
View hooks API Doc.
1.0.22
1 year ago
1.0.24
1 year ago
1.0.23
1 year ago
1.0.21
1 year ago
1.0.20
1 year ago
1.0.19
1 year ago
1.0.17
1 year ago
1.0.16
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.9
1 year ago
1.0.8
1 year ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago