Skip to content
  • SDKs
  • Client Side
  • JavaScript

JS Client SDK

The Hop JS Client SDK allows you to interact with Hop products from your frontend application.

Installation

The JS Client SDK is hosted on NPM under @onehop/client.

npm

npm i @onehop/client

Yarn

yarn add @onehop/client

Initializing the SDK

Find your project ID on this page.

import { hop } from "@onehop/client";
 
// hop.init should be called as early as possible in your application's lifecycle
 
hop.init({
    projectId: "project_xxx": // replace with your project ID
});
Last updated on September 21, 2022