Documentation
Search
K
Comment on page

Installation

In order to start adding messaging functionality to your web dapp, we need to install a few essential packages first.
npm:
npm install @dialectlabs/react-ui --save
# Solana messaging
npm install @dialectlabs/react-sdk-blockchain-solana --save
# Aptos messaging
npm install @dialectlabs/react-sdk-blockchain-aptos --save
# EVM messaging
npm install @dialectlabs/react-sdk-blockchain-evm --save
yarn:
yarn add @dialectlabs/react-ui
# Solana messaging
yarn add @dialectlabs/react-sdk-blockchain-solana
# Aptos messaging
yarn add @dialectlabs/react-sdk-blockchain-aptos
# EVM messaging
yarn add @dialectlabs/react-sdk-blockchain-evm
@dialectlabs/react-sdk-blockchain-solana, @dialectlabs/react-sdk-blockchain-aptos and @dialectlabs/react-sdk-blockchain-evm contain React abstractions (context, hooks) over @dialectlabs/react-sdk and @dialectlabs/sdk. Both packages have necessary tools to build a UI for messaging or notifications for Solana or Aptos projects.
  • Handles (re-)fetching and storing necessary messaging data from/on Solana blockchain, Dialect Cloud (for off-chain).
  • Provides connection state
  • Exposes low-level SDK API
@dialectlabs/react-sdk-blockchain-solana, @dialectlabs/react-sdk-blockchain-aptos and @dialectlabs/react-sdk-blockchain-evmare mutually inclusive, in case you're building a multi-chain dapp.
@dialectlabs/react-ui contains pre-built, themeable, self-sufficient and opinionated UI components for messaging and notification centers.
  • All exposed components are themed and can be configured to fit different use-cases
  • Even though exported UIs meant to be uncontrolled React components, the UI state can be handled anywhere in your dapp (e.g. routing)
Last modified 11mo ago