@fruits-chain/react-native-wechat
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

react-native-wechat

微信 SDK React-Native 原生模块(持续更新中)

Installation

npm install react-native-wechat

Usage

import { registerApp, shareText } from 'react-native-wechat';

// ...

const success = await registerApp('your appId');
if (success) {
  console.log('注册成功');
  shareText({
    text: '测试文本分享',
  });
}

API

registerApp(appId: string): Promise

注册应用

isWXAppInstalled(): Promise

检测本机是否安装微信

shareText(config: ShareTextConfig, callback?: CommonCallback): void

文本分享

shareImage(config: ShareImageConfig, callback?: CommonCallback): void

图片分享

shareWebpage(config: ShareWebpageConfig, callback?: CommonCallback): void

网页分享

shareVideo(config: ShareVideoConfig, callback?: CommonCallback): void

视频分享

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Package Sidebar

Install

npm i @fruits-chain/react-native-wechat

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

40.8 kB

Total Files

21

Last publish

Collaborators

  • hemuxue
  • nietao
  • changhuali
  • never-w
  • limoer
  • winljm001
  • onlyling