Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

react-native-ot-shield

1.0.6 • Public • Published

react-native-ot-shield

Simple Request Crash / Method manager

Installation

Use the yarn manager yarn to install react-native-ot-shield.

yarn add react-native-ot-shield

Configuration

You must create one configuration file

{
    "remote":"https://myremote.dev",
    "actions": [
        "isExampleToSimpleAction"
        {
            "name":"isExampleToComplexeAction",
            "actions": [
                "subAction",
                "anotherSubAction"
            ]
        }
    ]
}

shield.setup.json

Import

 
import Shield from 'react-native-ot-shield'
 

Prepare

 
Shield.load(require('myconfig.json'))
 

Usage

Simple action :

 
let result = await Shield.isExampleToSimpleAction({nameP:dataP}) // Return JSON
// This action send object {nameP:dataP, action: isExampleToSimpleAction} in post to request https://myremote.dev/isExampleToSimpleAction
 

Complexe action :

 
let result = await Shield.isExampleToComplexeAction.subAction({nameP:dataP}) // Return JSON
// This action send object {nameP:dataP, action: subAction} in post to request https://myremote.dev/isExampleToComplexeAction
 

MIT

Keywords

Install

npm i react-native-ot-shield

DownloadsWeekly Downloads

2

Version

1.0.6

License

ISC

Unpacked Size

4.05 kB

Total Files

5

Last publish

Collaborators

  • avatar