Skip to main content

Installation

Requirements

  • Node.js >= 18
  • npm, yarn, or pnpm

Install

npm install @armaanjain/courier-web-sdk

Peer Dependencies

React is an optional peer dependency. Install it only if you plan to use the React hooks:

npm install react

What's Included

The package ships two entry points:

ImportContents
@armaanjain/courier-web-sdkCore SDK (framework-agnostic)
@armaanjain/courier-web-sdk/reactReact bindings (hooks + context provider)

Module Formats

The package provides:

  • ESM (dist/index.js, dist/react.js) — for modern bundlers
  • CJS (dist/index.cjs, dist/react.cjs) — for Node.js / legacy bundlers
  • TypeScript declarations (dist/index.d.ts, dist/react.d.ts)

Dependencies

PackageRole
mqtt ^5.xUnderlying MQTT client (mqtt.js)
rxjs ^7.xInternal reactive streams
react >=18Optional — only for React hooks