npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-hubspot-wrapper

v0.5.1

Published

TurboModule wrapper for HubSpot mobile chat SDK

Readme

react-native-hubspot-wrapper

TurboModule-only React Native wrapper for the HubSpot Mobile Chat SDK.

Unofficial. Not affiliated with, endorsed by, or sponsored by HubSpot, Inc. "HubSpot" is a trademark of HubSpot, Inc.

Status

Early release (0.x). The public API may evolve before 1.0.

Currently supported:

  • initialize()
  • openChat(chatflow, options?)
  • setIdentity({ identityToken, email? })
  • setProperties(properties)
  • clearUserData()

Not yet implemented (planned):

  • Push notifications (FCM token registration on Android, APNs token on iOS, deep-linking from a notification into the relevant chat)
  • Chat lifecycle events (open / close / message-received callbacks exposed to JS)
  • Custom theming hooks beyond what the HubSpot dashboard chatflow already provides

PRs welcome.

Requirements

  • React Native 0.81+
  • New Architecture enabled
  • iOS 15+
  • Android minSdk 26

Installation

yarn add react-native-hubspot-wrapper

Then install iOS dependencies:

cd ios && pod install

Configuration

  • iOS: include Hubspot-Info.plist in your app target.
  • Android: include android/app/src/main/assets/hubspot-info.json.

Usage

import HubspotWrapper from 'react-native-hubspot-wrapper';

await HubspotWrapper.initialize();
await HubspotWrapper.setIdentity({ identityToken: 'token', email: '[email protected]' });
await HubspotWrapper.setProperties([{ name: 'plan', value: 'pro' }]);
await HubspotWrapper.openChat('support');

openChat keeps HubSpot's stock conversations navigation visible. Older versions accepted hideBackToInboxButton; the option is still accepted for compatibility, but it no longer changes the HubSpot UI.

API

  • initialize(): Promise<void>
  • openChat(chatflow: string, options?: { hideBackToInboxButton?: boolean }): Promise<void>
  • setIdentity({ identityToken, email? }): Promise<void>
  • setProperties(properties): Promise<void>
  • clearUserData(): Promise<void>

openChat(chatflow, options?)

Opens the HubSpot chat UI for the provided chatflow.

  • hideBackToInboxButton is deprecated and ignored.

clearUserData()

Clears the native SDK's current user/session state and waits for HubSpot chat visitor cookies/data cleanup to finish before resolving. This is intended for logout or account-switch flows so the next chat session does not reuse the previous visitor identity.

iOS SDK source strategy

This package vendors HubSpot iOS SDK source files under ios/HubspotMobileSDK. The files are intentionally committed to git for reproducible CocoaPods builds, since React Native does not yet integrate Swift Package Manager natively.

Current vendored source metadata is tracked in HUBSPOT_IOS_SDK_VERSION.json. The upstream LICENSE.txt is preserved alongside the vendored sources at ios/HubspotMobileSDK/LICENSE.txt, in compliance with the MIT license HubSpot ships their iOS SDK under.

When React Native adds first-class SwiftPM support, the vendored sources can be removed and replaced with a Package.swift dependency without any consumer-facing API changes.

Updating vendored HubSpot iOS SDK

Use the helper script:

yarn update:hubspot:ios

Note: the update script also reapplies a small CocoaPods compatibility patch set to HubSpot iOS sources (resource bundle + asset/localization access), so the wrapper remains buildable outside of pure Swift Package Manager integration.

Optional: update to an explicit tag:

yarn update:hubspot:ios 1.0.7

After updating:

  1. run cd ios && pod install in the consuming app
  2. run iOS/Android compile checks
  3. commit updated ios/HubspotMobileSDK and HUBSPOT_IOS_SDK_VERSION.json

License

This wrapper is released under the MIT license.

The vendored HubSpot iOS SDK source under ios/HubspotMobileSDK/ is also MIT-licensed by HubSpot, Inc. — see ios/HubspotMobileSDK/LICENSE.txt.

The HubSpot Android SDK is not redistributed by this package; it is fetched from Maven Central by the consuming app under HubSpot's terms.