Skip to content

Overview

MIDL JS SDK provides React hooks for easy integration of your React applications with the blockchain. The hooks are designed to be simple to use and provide a seamless experience for developers.

Under the hood the hooks use the @midl/core for blockchain interactions and @tanstack/react-query to manage state and data fetching.

Getting started

Install the package

bash
pnpm add @midl/react

Wrap your app with the MidlProvider

Wrap your app with the MidlProvider to provide the context to the hooks.

tsx
import { MidlProvider } from "@midl/react";
import { midlConfig } from "./midlConfig";

function App() {
  return (
    <MidlProvider config={midlConfig}>
      <MyComponent />
    </MidlProvider>
  );
}

Released under the MIT License