3.11.0 • Published 27 days ago

@hackler/react-native-sdk v3.11.0

Weekly downloads
-
License
MIT
Repository
-
Last release
27 days ago

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"}/>
3.11.0

27 days ago

3.10.0

2 months ago

3.9.1

4 months ago

3.7.3

9 months ago

3.9.0

5 months ago

3.8.0

6 months ago

3.7.2

11 months ago

3.7.1

11 months ago

3.7.0

11 months ago

3.6.1

12 months ago

3.6.0

1 year ago

3.5.1

1 year ago

3.5.0

1 year ago

3.4.0

1 year ago

3.3.1

1 year ago

3.4.1

1 year ago

3.3.0

1 year ago

3.2.0

1 year ago

3.1.3

2 years ago

3.1.2

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago