Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/growingio/react-native-growing-touch-demo
React Native 触达弹窗Demo
https://github.com/growingio/react-native-growing-touch-demo
Last synced: about 1 month ago
JSON representation
React Native 触达弹窗Demo
- Host: GitHub
- URL: https://github.com/growingio/react-native-growing-touch-demo
- Owner: growingio
- Created: 2019-11-23T02:15:58.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T01:31:07.000Z (almost 2 years ago)
- Last Synced: 2024-04-16T05:12:55.488Z (8 months ago)
- Language: JavaScript
- Size: 4.65 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 介绍
本仓库是一个集成了GrowingIO埋点SDK,GTouch安卓SDK以及GTouch_RN_SDK这三种sdk的RN应用。您可以直接下载到本地打包编译后在您的设备上运行。默认打开app会有一个弹窗,点击可以跳转到原生内部页。以供您体验弹窗SDK在RN框架上的表现。
![](https://tva1.sinaimg.cn/large/006y8mN6ly1g980yr2t2qj30su1hctbx.jpg)
## 正常
- app打开首页弹窗
- 触发事件弹窗
- 点击弹窗跳转app内部页面/h5页面/自定义路由页面## 使用
目前只做了安卓系统的demo,ios的会缺少一个原生页面,建议在安卓设备上体验。
```
npm isntall
react-native start
react-native run-android
```
## 弹窗监听
- 集成时推荐在安卓\iOS原生代码里监听,您可以使用我们定义好的点击弹窗跳转功能
- 如果想在RN代码里监听弹窗的话,参考HomeScreen.js里的写法,推荐写在componentWillMount这个生命周期里。
- 注意一旦在RN里监听了弹窗的话,您就必须自己实现点击弹窗跳转的逻辑,参考HomeScreen.js里的handleEventPopupListener里的onCliked写法。