0.4.0 • Published 2 years ago

gcp-miniappkit-jssdk v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

0.4.0

2 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago