Mesh 1.2.0
Mesh React
Mesh provides a collection of useful UI components, so you can easily include web3 functionality and convenient utilities for your application. To start, install the new mesh-react
package:
yarn add @martifylabs/mesh-react
MeshProvider
MeshProvider
was added to allow your app to subscribe to context changes and wallet states.
import { MeshProvider } from "@martifylabs/mesh-react";
function MyApp({ Component, pageProps }: AppProps) {
return (
<MeshProvider>
<Component {...pageProps} />
</MeshProvider>
);
};
UI Components
Mesh offers UI components you need to build your dApp, so you can jumpstart your next project and bring the user interface to life.
In this release, we introduce CardanoWallet
and MeshBadge
:
import { CardanoWallet } from '@martifylabs/mesh-react';
export default function Page() {
return (
<>
<CardanoWallet />
<MeshBadge dark={false} />
</>
);
}
Wallet Hooks
In a React application, Hooks allows you to extract and reuse stateful logic and variables without changing your component hierarchy. This makes it easy to reuse the same Hook among many components.
In this release, we introduce the following React hooks:
- useWalletList
- useAddress
- useAssets
- useLovelace
- useNetwork
- useWallet