11 Star 26 Fork 7

thanatosx / oschina_for_react_native

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

##oschina_for_react_native

纯粹学习之作,里面只有Android代码,IOS没有适配,等我什么时候买了肾机再考虑适配IOS.

##学习资料 -React Native官网 官方的,你懂的

-React Native中文网 与官方文档同步,不用担心文档落后问题

-React React必学!

##效果图

##Note 使用之前,请修改一下BackAndroid.android.js的源代码的RCTDeviceEventEmitter.addListener()这个function

以前的:

RCTDeviceEventEmitter.addListener(DEVICE_BACK_EVENT, function() {
  var backPressSubscriptions = new Set(_backPressSubscriptions);
  var invokeDefault = true;
  backPressSubscriptions.forEach((subscription) => {
    if (subscription()) {
      invokeDefault = false;
    }
  });
  if (invokeDefault) {
    BackAndroid.exitApp();
  }
});

修改后

RCTDeviceEventEmitter.addListener(DEVICE_BACK_EVENT, function() {
  var backPressSubscriptions = new Set(_backPressSubscriptions);
  var invokeDefault = true;
  for(let subscriber of backPressSubscriptions.keys()){
    if (subscriber()){
      invokeDefault = false;
      break;
    }
  }
  if (invokeDefault) {
    BackAndroid.exitApp();
  }
});
The MIT License (MIT) Copyright (c) 2016 thanatosx Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

oschina application client for react native,想要IOS版的自行脑补 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/handoop/oschina_for_react_native.git
git@gitee.com:handoop/oschina_for_react_native.git
handoop
oschina_for_react_native
oschina_for_react_native
master

搜索帮助

14c37bed 8189591 565d56ea 8189591