@fruits-chain/react-native-wechat
v0.2.0
Published
React-Native Native Module for Wechat SDK
Downloads
7
Readme
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