Skip to content

dynamic-labs-oss/react-via-js-example-app

Repository files navigation

Dynamic JavaScript SDK — React reference app

Reference implementation for integrating the Dynamic JavaScript SDK (@dynamic-labs-sdk/*) in a React app: authentication, multi-chain wallets, WalletConnect, checkout, and related UI patterns.

Requirements

Quick start

npm install
cp .env.example .env

Edit .env and set VITE_DYNAMIC_ENVIRONMENT_ID to your Environment ID.

npm run dev

The dev server listens on http://localhost:5200.

Environment variables

Variable Required Description
VITE_DYNAMIC_ENVIRONMENT_ID Yes Your Dynamic Environment ID

See .env.example for copy-paste templates.

Scripts

Command Description
npm run dev Start Vite dev server
npm run build Production build to dist/
npm run preview Serve the production build locally
npm run lint Run ESLint

Checkout

The Checkout route (/checkout) demonstrates the full on-chain payment flow: create a transaction, select a source token, review the quote, submit, and poll for settlement status.

To use it, navigate to Checkout in the sidebar after signing in and enter your Checkout ID in the form. The ID is saved to localStorage so you only need to enter it once. Checkout IDs are created in the Dynamic dashboard.

Documentation

  • Dynamic docs
  • JavaScript SDK packages are published under the @dynamic-labs-sdk scope on npm.

License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages