Dialect React SDK & UI 💬
React components to use Dialect's wallet alerts.
Want to learn how to add Dialect to your dapp? See our Docs.
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
- Git
- yarn 1
- Nodejs (>=18)
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.
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.
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.
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
- Update all versions of packages to the new one(e.g. bump react, react-ui version in examples, starters folder)
This project is tested with BrowserStack.