You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@hackler/react-native-sdk

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hackler/react-native-sdk

React Native SDK for Hackle

3.25.0
latest
npmnpm
Version published
Weekly downloads
145
74.7%
Maintainers
1
Weekly downloads
 
Created
Source

Hackle React Native SDK

Install

npm install --save @hackler/react-native-sdk

react-native link

cd ios
pod install

Usage

initialize

import { createInstance } from "@hackler/react-native-sdk";

const hackleClient = createInstance("YOUR_APP_SDK_KEY");
const user = {
  id: "ae2182e0",
  properties: {
    app_version: "1.0.1",
    age: 23,
    paying_customer: true
  }
};

const App: () => React$Node = () => {
  return (
    <HackleProvider hackleClient={hackleClient} user={user} timeout={1000}>
      <YourApp/>
    </HackleProvider>
  );
};

Decide the variation

function App() {
  return (
    <HackleExperiment experimentKey={42}>
      <HackleVariation variation={"A"}>
        <OldBlueButton/>
      </HackleVariation>
      <HackleVariation variation={"B"}>
        <NewRedButton/>
      </HackleVariation>
    </HackleExperiment>
  )
};

Decide the Feature

function App() {
  return (
    <HackleFeature featureKey={42}>
      {(isOn) =>
        (isOn ? <NewFeature/> : <OldFeature/>)
      }
    </HackleFeature>
  )
};

Recodes the event

const track = useTrack()
const event = {
  key: "purchase",
  value: 5000,
  properties: {
    first_paying: false,
    item_count: 5
  }
}

<Button onPress={() => track(event)} title={"Purchase"}/>

Keywords

react-native

FAQs

Package last updated on 25 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.