0.10.0 • Published 4 years ago
@chargetrip/react-sdk v0.10.0
@chargetrip/react-sdk
React SDK for Chargetrip services.
Disclaimer: The package is under active development and the final API is a subject to change.
Installation & usage
Install the package in your project:
yarn add @chargetrip/react-sdk
Then import it:
import * as NativeSDK from '@chargetrip/react-sdk/native';
// or
import * as WebSDK from '@chargetrip/react-sdk/web';
// TODO: example
Target support
@chargetrip/react-sdk
supports:
- TypeScript - provides type declarations for the JavaScript files
- Browser - provides pre-built and minified ESM modules for those browsers under
@chargetrip/react-sdk/web
- React Native - provides source code (the build will done in your project) under
@chargetrip/react-sdk/native
If you need to target different environments or only modern browsers, we recommend to setup compilation of the shipped source code in your project. The source code is available in @chargetrip/react-sdk/src
directory. If you're using using Babel, please make sure the following presets/plugins are included in your Babel config:
@babel/preset-typescript
@babel/plugin-proposal-class-properties
@babel/plugin-proposal-optional-chaining
@babel/plugin-proposal-nullish-coalescing-operator