0.1.7 • Published 2 months ago

rn-drivercom-framework v0.1.7

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

rn-drivercom-framework

this is a framework for applications drivercom

Installation

npm install rn-drivercom-framework
yarn add rn-drivercom-framework

Usage

import { getToken, DrivercomProviderProps } from 'rn-drivercom-framework';

// ...
const [result, setResult] = React.useState<
    DrivercomProviderProps | undefined
  >();

useEffect(() => {
  const setToken = async () => {
    try {
      const res = await getToken();
      console.log('result', res);
      setResult(res);
    } catch (error) {
      console.error('Ocurrió un error al obtener el token:', error);
    }
  };

  setToken();
}, [])

Information data

!NOTE The token returns three values the token, if the token is valid and if we have didcom provider

{
  "userId": "0001",
  "userName": "youruser@didcom.com.mx",
  "database": "didcomdemo",
  "token": "z[hmGz'hzwbu&/",
  "drivercomProvider": true
}

!WARNING if no exits Drivercom on your device the response will be the following

{
  "drivercomProvider": false
}

License

MIT


Made with create-react-native-library

0.1.7

2 months ago

0.1.6

3 months ago

0.1.5

5 months ago

0.1.4

5 months ago

0.1.3

5 months ago

0.1.2

5 months ago

0.1.1

5 months ago

0.1.0

5 months ago