SDK docs menuSetup

Setup

Install the evmux-app-framework package with npm or Yarn and import EvmuxAppsApi into your app.

Install the package

Install evmux-app-framework with npm:

npm install evmux-app-framework

Or with Yarn:

yarn add evmux-app-framework

Import the API

Import EvmuxAppsApi, along with anything else you need from the package:

import EvmuxAppsApi from 'evmux-app-framework/src/EvmuxAppsApi/EvmuxAppsApi'

The same module also exports the list of event names:

import EvmuxAppsApi, { availableEvents } from 'evmux-app-framework/src/EvmuxAppsApi/EvmuxAppsApi'

Create an instance

Every page of your app creates its own instance:

const evmuxApi = new EvmuxAppsApi()

The SDK talks to the studio that loaded your page. It works when your page runs inside evmux, or inside the test page that comes with the sample app. Opened on its own in a browser tab, your page has no studio to talk to.

Next steps

  • Run the sample app to see a working widget and settings page.
  • Read the lifecycle to learn when evmux shows your app.

Stuck, or found a mistake in these docs? Tell us.