Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

akashrdev/react

Open more actions menu
 
 

Repository files navigation

Dialect React SDK & UI 💬

react-sdk npm npm

React components to use Dialect's wallet alerts.

Want to learn how to add Dialect to your dapp? See our Docs.

Table of Contents

Installation

npm:

npm install @dialectlabs/react-ui --save

npm install @dialectlabs/react-sdk-blockchain-solana --save

yarn:

yarn add @dialectlabs/react-ui

yarn add @dialectlabs/react-sdk-blockchain-solana

Development

Prerequisites

  • Git
  • yarn 1
  • Nodejs (>=18)

Get Started

This repo utilizes Workspaces. Publishable packages are located under packages directory. examples directory contains apps to demonstrate how can Dialect be used.

The simplest way to develop on Dialect's component library and headless react contexts locally is to run one of the demo apps in the examples/ directory, and ensure you are targeting the local instances of packages/react-sdk, packages/react-ui and packages/react-sdk-blockchain-solana. How to best do this is described below.

Once set up, you'll have live, hot-reloading on changes. Some manual configuration is required to enable this.

Enable hot-reloading from an examples/ app

Choose one of the examples/ apps you'd like to do development from and then make the following changes in its source. For illustration purposes we choose examples/notifications-solana.

For example you want to make changes in react-ui library

Run

yarn run dev:react-ui

All of the above changes require restarting the next server and clearing cache (just in case), if you've already started it.

You can now run the example by following the instructions in the next section.

Start the examples

To get started, launch example's next dev server:

yarn install # in root dir
cd examples/notifications-solana
yarn run dev

Now you have a hot reload of the packages in the workspace.

Publishing

yarn run build:all
pushd packages/react-sdk/
npm publish --access public
popd
pushd packages/react-sdk-blockchain-solana/
npm publish --access public
popd
pushd packages/react-ui/
npm publish --access public
popd
  1. Update all versions of packages to the new one(e.g. bump react, react-ui version in examples, starters folder)

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.7%
  • JavaScript 1.8%
  • CSS 1.5%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.