0.0.7 • Published 5 years ago

@gamiphy/loyality-station-react-native-sdk v0.0.7

Weekly downloads
8
License
-
Repository
-
Last release
5 years ago

Gmiphy Loyalty Station SDK

Gmiphy Loyalty Station npm module Link

Introduction

Gamiphy Loyalty & Rewards, is a gamified loyalty program plugin/widget for eCommerce. You will be able to reward users with points for completing pre defined "challenges" within your store. In addition to that users can compete with each other in compeitions reflected on a leaderboard, receive badges and invite their freinds, among other gamified features.

Installation

Gamiphy Loyalty Station is available through npm, To install:

npm install --save @gamiphy/loyality-station-react-native-sdk

Getting started

Import LoyaltyStation from the library:

import {LoyaltyStation} from "@gamiphy/loyality-station-react-native-sdk"

Then wrap your code in LoyaltyStation component to make it available to all components.

<LoyaltyStation config={config:WebviewConfig}>  
    <YourComponent/>
</LoyaltyStation>

You can usee the use the hooks based API to access the Loyalty Station functionality :

function App() {
    const {open, close} = useLoyaltyStation()

    return (  
         <View>  
             <Button title="Open Loyalty Station " onPress={() => open()}/>  
             <Button title="Close Loyalty Station" onPress={() => close()}/>  
         </View>
     );
}

Injected props

It will inject the following props to the component:

`config` :
        `app`               - the loyality station id "bot Id"
        `user`:
            `email`         - is a must
            `hash`          - is a must
            `firstName`     - optional 
            `lastName`      - optional
0.0.3

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago