gcp-miniappkit-jssdk
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

gcp-miniappkit-jssdk

NPM JavaScript Style Guide semantic-release

Resources

Install

npm install --save gcp-miniappkit-jssdk

Supported platforms

From iOS11 and Android Marshmallow(6.0)

  • iOS Safari 11
  • Chrome mobile at least 49, strongly recommended from 69

Usage

React

import React from 'react'
import SDK from 'gcp-miniappkit-jssdk'

SDK.init('mock') // will be only mocks, use real bundle id for real response

const SomeComponents = () => {
  const [result, setResult] = React.useState()
  const [error, setError] = React.useState()

  const getUserInfo = () => {
    SDK.getUserInfo('userId').then(setResult).catch(setError)
  }

  return (
    <div>
      <button onClick={getUserInfo} />
      <div>Result: {result}</div>
      <div>Error: {error}</div>
    </div>
  )
}

Examples

Local Development

Setup and running WIKI

Have few examples how to use library, it also used for testing purposes. Run yarn start or yarn build first and run example with:

License

MIT ??? © OPN By asmyshlyaev177

Readme

Keywords

none

Package Sidebar

Install

npm i gcp-miniappkit-jssdk

Weekly Downloads

0

Version

0.4.0

License

MIT

Unpacked Size

48.8 kB

Total Files

9

Last publish

Collaborators

  • opn-devops