Giter Site home page Giter Site logo

attentiveness / reading Goto Github PK

View Code? Open in Web Editor NEW
3.4K 166.0 885.0 22.23 MB

iReading App Write In React-Native

Home Page: https://richardcao.me/2016/07/05/Talk-About-Reading/

License: Apache License 2.0

Java 8.03% JavaScript 79.49% Objective-C 10.69% Starlark 1.78%
react-native redux redux-saga android ios react-navigation

reading's Introduction

iReading

iReading_Logo

Build Status Code Climate Join the chat at https://gitter.im/attentiveness/reading License Apache2.0 GitHub release PRs Welcome

iReading App Write In React-Native(Studying and Programing)

Support: Android 4.1 (API 16)+ IOS(8.0+)

No Profit, No Advertisement, Only Feelings

Screenshot

iReading_Main iReading_Article iReading_Category iReading_IOS_Main iReading_IOS_Share

Download

β Version(master branch)

Android: Download iReading

From Android Market(Old)

360 Android Market: Download iReading

Wandou Labs: Download iReading

From App Store(Old)

Download iReading

Application Architecture

  • Microsoft Code Push for dynamic update.
  • Redux is a predictable state container for reading application, together with React Native.
  • Redux-Saga is a library that aims to make side effects in reading application easier and better.
  • react-navigation is an extensible yet easy-to-use navigation solution, can also be used across React and React Native projects allowing for a higher degree of shared code.
  • Jest for testing React Native components and UT.
  • Eslint is a tool for identifying and reporting on patterns found in reading application code.
  • react-native-exceptions-manager for handling crashes in release version.

Development Workflow

Step One

yarn(or npm) install -g react-native-cli

Step Two

yarn(or npm) install

Step Three

react-native start

Run Test

yarn(or npm) test

Format Code

yarn(or npm run) format

Run Lint

yarn(or npm run) lint

Importance

ShowAPI was used by iReading from free to charge, so my key doesn't work. You could apply for a new key and replace in UrlUtil.js, it will work properly. Reference this issue: Cannot convert undefined or null to object. I apologize to inconvenience you.

Release Note

Reading Release Note

Contributing

For more information about contributing PRs and issues, see our Contribution Guidelines.

License

Apache License 2.0

reading's People

Contributors

dependabot[bot] avatar jiangqqlmj avatar pppluto avatar remxcode avatar richard-cao avatar techieshark avatar vmlinz avatar zdouble avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reading's Issues

你好,我安装的时候出现这个错误

找不到leadclound-storage下的qiniu/io.js 然后我下载了网站上了apk 也进入之后会闪退 。 昨天老大打包发现在android 4.4 下会出现闪退的问题 你看看是不是我4.4的问题 谢谢!

requiring known module -WIN10

你好,我再win10启动的工程,部署到手机上后,手机加载完bundle后出现了requiring known module ”./qiniu/auth/digest.js”.If you are sure the module is there, try restarting the packager or running npm install 的异常,但是工程中已经存在了qiniu的module,且npm清空缓存都没用,您知道是为什么么?

ios version error

hi
本人最近在学习RN,无意中发现了这个项目,我去app store下载后,打开发现没办法用,到处都是网络链接错误,所以想问一下,此项目是否还在维护?

react-native run-ios 报错

.../reading/node_modules/promise/lib/done.js:10
throw err;
^

Error: xcodebuild process exited with code 65
at ChildProcess. (runIOS.js:102:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

run-ios

Installing build/Build/Products/Debug-iphonesimulator/reading.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/reading.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

TypeError:Network request failed

你好,我想请教下 我仿照案例新建了一个Demo,然后一点一点照搬代码去理解,运行之后,Android可以显示出来 新闻列表数据,但是 Ios显示 TypeError:Network request failed 这个错误。

潜在bug或者优化建议——导航栏用单例模式

var singleinstance;
ReadingToolbar = ({
  title,
  subtitle,
  actions,
  navigator,
  onActionSelected,
  onIconClicked,
  navIconName
}) => {
  const handleIconClicked = () => {
                if (onIconClicked) {
                    onIconClicked();
             } else if (navigator) {
                naviGoBack(navigator);
         }
         };
  const renderToolbarAndroid = () => (
    <Icon.ToolbarAndroid
      style={styles.toolbar}
      actions={actions}
      onActionSelected={onActionSelected}
      onIconClicked={handleIconClicked}
      navIconName={navIconName === undefined ? 'md-arrow-back' : navIconName}
      titleColor="#fff"
      title={title}
      subtitleColor="#fff"
      subtitle={subtitle}
      overflowIconName="md-more"
    >
      <CountdownText/>

</Icon.ToolbarAndroid>


  );
    const renderToolbarIOS = () => {
    const action = actions[0];
    showActionButton = action !== undefined;
    return (
      <View style={styles.toolbar}>
        <Icon.Button
          name={navIconName === undefined ? 'ios-arrow-back' : navIconName}
          iconStyle={styles.leftIOS}
          onPress={handleIconClicked}
          backgroundColor="transparent"
          underlayColor="transparent"
          activeOpacity={0.8}
        />
        <Text
          style={[styles.titleIOS,
          showActionButton ? { paddingLeft: 0 } : { paddingLeft: -35 }]}
        >
          {title}+{'\t\t\t'}+{subtitile}
        </Text>
        {showActionButton && action.show === 'always' ?
          <Icon.Button
            iconStyle={showActionButton ? styles.rightIOS : { height: 0, width: 0 }}
            name={action.iconName}
            backgroundColor="transparent"
            underlayColor="transparent"
            activeOpacity={0.8}
            onPress={onActionSelected}
          /> :
          <Button
            containerStyle={showActionButton ? styles.rightIOS : { height: 0, width: 0 }}
            style={styles.rightText}
            text={showActionButton ? action.title : ''}
            onPress={onActionSelected}
          />
        }
      </View>
    );
  };

const Toolbar = Platform.select({
android: () => renderToolbarAndroid(),
ios: () => renderToolbarIOS()


  });

singleinstance=
console.log(this);
console.log('----single------');
console.log(singleinstance);
return singleinstance;


};
const styles = StyleSheet.create({
  toolbar: {
    flexDirection: 'column',
    backgroundColor: '#3e9ce9',
    alignItems: 'center',
    height: 58
  },
  titleIOS: {
    flex: 1,
    textAlign: 'center',
    color: '#fff',
    fontSize: 20,
    marginTop: 20
  },
  leftIOS: {
    marginTop: 20,
    marginLeft: 8
  },
  rightIOS: {
    marginTop: 20,
    marginRight: 8
  },
  rightText: {
    textAlign: 'center',
    color: '#fff',
    fontSize: 18
  }
});
export default ReadingToolbar;

readingtoolbar的代码等价于以上代码,其中代码块被我省略,那些属性和赋值都是没有用的,因为不会被调用。
### 建议为什么要是单例呢?

> 因为这个导出的是一个对象字面量,这个对象字面量用的方法是()=> 每次都会重新生成一个导航控件。这样做的结果是,每次从drawtab项进入子页面都用的是一个新的导航控件,虽然退出的时候也会unmount,但是这个unmount并不等于会被gc清除掉,只是被挂载。所以这些对象并没有被释放容易导致内存泄漏,很明显的例子是,开了debug模式进入这些页面之后会非常卡,因为dubug模式跟这些未被释放的资源有监控联系。同理,如果是比较复杂的页面不用单例模式会导致崩溃。

About minSDK version

Yoy said that it support Android 4.1 (API 16)+
But it throw a exception on API19;
with:
Caused by: com.facebook.react.bridge.JSApplicationIllegalArgumentException: Attribute selectableItemBackgroundBorderless couldn't be found in the resource list;

had depend on: com.android.support:appcompat-v7:23.3.0

May I have done something wrong?

打包时插件有问题

A problem occurred configuring project ':RNDeviceInfo'.

Could not resolve all dependencies for configuration ':RNDeviceInfo:_debugCompile'.
Could not find com.google.android.gms:play-services-gcm:8.3.0.
Searched in the following locations:
file:/C:/Users/Administrator/.m2/repository/com/google/android/gms/play-services-gcm/8.3.0/play-services-gcm-8.3.0.pom
file:/C:/Users/Administrator/.m2/repository/com/google/android/gms/play-services-gcm/8.3.0/play-services-gcm-8.3.0.jar
https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/8.3.0/play-services-gcm-8.3.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/8.3.0/play-services-gcm-8.3.0.jar
file:/E:/works/rn/gitphoto/reading/node_modules/node_modules/react-native/android/com/google/android/gms/play-services-gcm/8.3.0/play-services-gcm-8.3.0.pom
file:/E:/works/rn/gitphoto/reading/node_modules/node_modules/react-native/android/com/google/android/gms/play-services-gcm/8.3.0/play-services-gcm-8.3.0.jar
file:/D:/codes/android-sdk-windows/extras/android/m2repository/com/google/android/gms/play-services-gcm/8.3.0/play-services-gcm-8.3.0.pom
file:/D:/codes/android-sdk-windows/extras/android/m2repository/com/google/android/gms/play-services-gcm/8.3.0/play-services-gcm-8.3.0.jar
Required by:
reading:RNDeviceInfo:unspecified
原因在此
react-native-device-info/react-native-device-info#78

android打包出现错误

环境:
mac系统、jdk 1.8、android studio 2.1

错误信息:

AGPBI: {"kind":"simple","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]}
AGPBI: {"kind":"simple","text":"(com.tencent.mm.sdk.openapi.WXApiImplV10$ActivityLifecycleCb$1) that doesn\u0027t come with an","sources":[{}]}
AGPBI: {"kind":"simple","text":"associated EnclosingMethod attribute. This class was probably produced by a","sources":[{}]}
AGPBI: {"kind":"simple","text":"compiler that did not target the modern .class file format. The recommended","sources":[{}]}
AGPBI: {"kind":"simple","text":"solution is to recompile the class from source, using an up-to-date compiler","sources":[{}]}
AGPBI: {"kind":"simple","text":"and without specifying any \"-target\" type options. The consequence of ignoring","sources":[{}]}
AGPBI: {"kind":"simple","text":"this warning is that reflective operations on this class will incorrectly","sources":[{}]}
AGPBI: {"kind":"simple","text":"indicate that it is *not* an inner class.","sources":[{}]}
AGPBI: {"kind":"simple","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]}
AGPBI: {"kind":"simple","text":"(com.tencent.mm.sdk.openapi.WXApiImplV10$ActivityLifecycleCb$2) that doesn\u0027t come with an","sources":[{}]}
AGPBI: {"kind":"simple","text":"associated EnclosingMethod attribute. This class was probably produced by a","sources":[{}]}
AGPBI: {"kind":"simple","text":"compiler that did not target the modern .class file format. The recommended","sources":[{}]}
AGPBI: {"kind":"simple","text":"solution is to recompile the class from source, using an up-to-date compiler","sources":[{}]}
AGPBI: {"kind":"simple","text":"and without specifying any \"-target\" type options. The consequence of ignoring","sources":[{}]}
AGPBI: {"kind":"simple","text":"this warning is that reflective operations on this class will incorrectly","sources":[{}]}
AGPBI: {"kind":"simple","text":"indicate that it is *not* an inner class.","sources":[{}]}
AGPBI: {"kind":"simple","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]}
AGPBI: {"kind":"simple","text":"(com.tencent.mm.sdk.b.b) that doesn\u0027t come with an","sources":[{}]}
AGPBI: {"kind":"simple","text":"associated EnclosingMethod attribute. This class was probably produced by a","sources":[{}]}
AGPBI: {"kind":"simple","text":"compiler that did not target the modern .class file format. The recommended","sources":[{}]}
AGPBI: {"kind":"simple","text":"solution is to recompile the class from source, using an up-to-date compiler","sources":[{}]}
AGPBI: {"kind":"simple","text":"and without specifying any \"-target\" type options. The consequence of ignoring","sources":[{}]}
AGPBI: {"kind":"simple","text":"this warning is that reflective operations on this class will incorrectly","sources":[{}]}
AGPBI: {"kind":"simple","text":"indicate that it is *not* an inner class.","sources":[{}]}

打包最终结果如下:

app-armeabi-v7a-release-unaligned.apk
app-armeabi-v7a-release.apk
app-x86-release-unaligned.apk
app-x86-release.apk

请问会有什么影响吗?

Build failure with an exception

  • What went wrong:
    Execution failed for task ':RNDeviceInfo:prepareComAndroidSupportAppcompatV72220Library'.

    Could not expand ZIP 'D:\ProgramFiles\android_sdk\extras\android\m2repository\com\android\support\appcompat-v7\22.2.0\appcompat-v7-22.2.0.aar'.

我的sdk目录下是存在这个aar的

遇到了一个问题,请教一下

TransformError: /Users/xxx/Desktop/git/reading/node_modules/debug/browser.js: Couldn't find preset "es2015" relative to directory "/Users/xxx/Desktop/git/reading/node_modules/debug"

RCTFatal
-[RCTBatchedBridge stopLoadingWithError:]
__25-[RCTBatchedBridge start]_block_invoke_2
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_callback_4CF
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
UIApplicationMain
main
start

潜在bug或者优化建议——导航栏用单例模式

var singleinstance;
ReadingToolbar = ({
  title,
  subtitle,
  actions,
  navigator,
  onActionSelected,
  onIconClicked,
  navIconName
}) => {
  const handleIconClicked = () => {
                if (onIconClicked) {
                    onIconClicked();
             } else if (navigator) {
                naviGoBack(navigator);
         }
         };
  const renderToolbarAndroid = () => (
    <Icon.ToolbarAndroid
      style={styles.toolbar}
      actions={actions}
      onActionSelected={onActionSelected}
      onIconClicked={handleIconClicked}
      navIconName={navIconName === undefined ? 'md-arrow-back' : navIconName}
      titleColor="#fff"
      title={title}
      subtitleColor="#fff"
      subtitle={subtitle}
      overflowIconName="md-more"
    >
      <CountdownText/>

</Icon.ToolbarAndroid>


  );
    const renderToolbarIOS = () => {
    const action = actions[0];
    showActionButton = action !== undefined;
    return (
      <View style={styles.toolbar}>
        <Icon.Button
          name={navIconName === undefined ? 'ios-arrow-back' : navIconName}
          iconStyle={styles.leftIOS}
          onPress={handleIconClicked}
          backgroundColor="transparent"
          underlayColor="transparent"
          activeOpacity={0.8}
        />
        <Text
          style={[styles.titleIOS,
          showActionButton ? { paddingLeft: 0 } : { paddingLeft: -35 }]}
        >
          {title}+{'\t\t\t'}+{subtitile}
        </Text>
        {showActionButton && action.show === 'always' ?
          <Icon.Button
            iconStyle={showActionButton ? styles.rightIOS : { height: 0, width: 0 }}
            name={action.iconName}
            backgroundColor="transparent"
            underlayColor="transparent"
            activeOpacity={0.8}
            onPress={onActionSelected}
          /> :
          <Button
            containerStyle={showActionButton ? styles.rightIOS : { height: 0, width: 0 }}
            style={styles.rightText}
            text={showActionButton ? action.title : ''}
            onPress={onActionSelected}
          />
        }
      </View>
    );
  };

const Toolbar = Platform.select({
android: () => renderToolbarAndroid(),
ios: () => renderToolbarIOS()


  });

singleinstance=
console.log(this);
console.log('----single------');
console.log(singleinstance);
return singleinstance;


};
const styles = StyleSheet.create({
  toolbar: {
    flexDirection: 'column',
    backgroundColor: '#3e9ce9',
    alignItems: 'center',
    height: 58
  },
  titleIOS: {
    flex: 1,
    textAlign: 'center',
    color: '#fff',
    fontSize: 20,
    marginTop: 20
  },
  leftIOS: {
    marginTop: 20,
    marginLeft: 8
  },
  rightIOS: {
    marginTop: 20,
    marginRight: 8
  },
  rightText: {
    textAlign: 'center',
    color: '#fff',
    fontSize: 18
  }
});
export default ReadingToolbar;

readingtoolbar的代码等价于以上代码,其中代码块被我省略,那些属性和赋值都是没有用的,因为不会被调用。

建议为什么要是单例呢?

因为这个导出的是一个对象字面量,这个对象字面量用的方法是()=> 每次都会重新生成一个导航控件。这样做的结果是,每次从drawtab项进入子页面都用的是一个新的导航控件,虽然退出的时候也会unmount,但是这个unmount并不等于会被gc清除掉,只是被挂载。所以这些对象并没有被释放容易导致内存泄漏,很明显的例子是,开了debug模式进入这些页面之后会非常卡,因为dubug模式跟这些未被释放的资源有监控联系。同理,如果是比较复杂的页面不用单例模式会导致崩溃。

Execution failed for task ':RCTWeChat:extractReleaseAnnotations'. > com/intellij/psi/PsiJavaFile

你好,我使用的是windows 7,git clone了你的代码,npm install了相关依赖,一切正常,执行react-native run-android后编译失败,输入如下:
Incremental java compilation is an incubating feature.
:RCTWeChat:preBuild UP-TO-DATE
:RCTWeChat:preReleaseBuild UP-TO-DATE
:RCTWeChat:checkReleaseManifest
:RCTWeChat:preDebugAndroidTestBuild UP-TO-DATE
:RCTWeChat:preDebugBuild UP-TO-DATE
:RCTWeChat:preDebugUnitTestBuild UP-TO-DATE
:RCTWeChat:preReleaseUnitTestBuild UP-TO-DATE
:RCTWeChat:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:RCTWeChat:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
:RCTWeChat:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:RCTWeChat:prepareComFacebookFrescoDrawee061Library UP-TO-DATE
:RCTWeChat:prepareComFacebookFrescoFbcore061Library UP-TO-DATE
:RCTWeChat:prepareComFacebookFrescoFresco061Library UP-TO-DATE
:RCTWeChat:prepareComFacebookFrescoImagepipeline061Library UP-TO-DATE
:RCTWeChat:prepareComFacebookFrescoImagepipelineOkhttp061Library UP-TO-DATE
:RCTWeChat:prepareComFacebookReactReactNative0153Library UP-TO-DATE
:RCTWeChat:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:RCTWeChat:prepareReleaseDependencies
:RCTWeChat:compileReleaseAidl UP-TO-DATE
:RCTWeChat:compileReleaseNdk UP-TO-DATE
:RCTWeChat:compileLint UP-TO-DATE
:RCTWeChat:copyReleaseLint UP-TO-DATE
:RCTWeChat:compileReleaseRenderscript UP-TO-DATE
:RCTWeChat:generateReleaseBuildConfig UP-TO-DATE
:RCTWeChat:generateReleaseResValues UP-TO-DATE
:RCTWeChat:generateReleaseResources UP-TO-DATE
:RCTWeChat:mergeReleaseResources UP-TO-DATE
:RCTWeChat:processReleaseManifest UP-TO-DATE
:RCTWeChat:processReleaseResources UP-TO-DATE
:RCTWeChat:generateReleaseSources UP-TO-DATE
:RCTWeChat:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:RCTWeChat:compileReleaseJavaWithJavac UP-TO-DATE
:RCTWeChat:extractReleaseAnnotations FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':RCTWeChat:extractReleaseAnnotations'.

    com/intellij/psi/PsiJavaFile

RCTWeChat.xcodeproj下search header paths改了没用

我也是运行ios报错 RCTBridgeModule.h这个头文件没找到,看到你说的RCTWebChat.xcodeproj的build setting 下改,改完以后还是报找不到,
$(SRCROOT)/../../react-native/React
$(SRCROOT)/../../react-native/Libraries
这样两个一个是加在header search path
一个是加在library search path 下,对吧,要选recursive么

iOS真机跑不起来

2016-11-30 13:45:36.114 [info][tid:main][RCTBatchedBridge.m:73] Initializing <RCTBatchedBridge: 0x1345f1700> (parent: <RCTBridge: 0x1345f0e30>, executor: RCTJSCExecutor)
2016-11-30 13:45:36.120 iReading[5649:541805] * Assertion failure in -RCTBatchedBridge loadSource:onProgress:, /Users/Ailix/RN/reading/node_modules/.0.38.0@react-native/React/Base/RCTBatchedBridge.m:197

看了下jsCodeLocation为空 新手求助

请教,关于store一些问题

你好!我对store 最后configureStore(initialState) 这方法不太懂想请教一下

export default function configureStore(initialState) {
const store = createStoreWithMiddleware(rootReducer, initialState);

return store;
}

应该怎么做才能运行起来?

我直接clone了项目到本地然后
dashzhao@dashdeMacBook-Pro:~/Learn/reactNative$ git clone https://github.com/attentiveness/reading.git Cloning into 'reading'... remote: Counting objects: 1509, done. remote: Compressing objects: 100% (76/76), done. remote: Total 1509 (delta 25), reused 0 (delta 0), pack-reused 1429 Receiving objects: 100% (1509/1509), 1.77 MiB | 120.00 KiB/s, done. Resolving deltas: 100% (822/822), done. Checking connectivity... done. dashzhao@dashdeMacBook-Pro:~/Learn/reactNative$ ls AwesomeProject Hello UseView reading dashzhao@dashdeMacBook-Pro:~/Learn/reactNative$ cd reading/ dashzhao@dashdeMacBook-Pro:~/Learn/reactNative/reading$ ls LICENSE Reading_OnLine_Accident.md index.android.js package.json README.md android index.ios.js screenshot Reading_Logo.png app ios dashzhao@dashdeMacBook-Pro:~/Learn/reactNative/reading$ react-native run-android Commandrun-androidunrecognized. Did you mean to run this inside a react-native project?

刚开始学习RN所以不知道怎么做

好了我知道怎么做了 ,
需要npm install 这样下载package.json 里的依赖

编译出错 android设备

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:prepareReadingRCTWeChatUnspecifiedLibrary'.

Could not copy zip entry E:\WorkSpace\Studio_space_Test\ReactNativeDemo\readin
g-master1\reading-master\node_modules\react-native-wechat\android\build\outputs
aar\RCTWeChat-release.aar!res/ to 'E:\WorkSpace\Studio_space_Test\ReactNativeDem
o\reading-master1\reading-master\android\app\build\intermediates\exploded-aar\re
ading\RCTWeChat\unspecified\res'.

codepush.getReactPackage is not correct

because codepush has update to 1.12.2-beta and codepush implements reactPackage

so in mainActivity.java

this.codePush.getReactPackage() can instead of this.codePush directly

一些反馈

  • BUG
    多列表共享store相同数据(reducer - read)
  isRefreshing: false,
  loading: false,
  isLoadMore: false,
  noMore: false,

造成展示状态混乱,不同列表应对应不同状态

多列表共享page 数据展示错误
比如列表1到了第10页,列表二才刚展示,但是加载更多的时候就是从第11页开始的

  • 结构建议
    应继续分层
    列表应单独出来 (page/Feeds)结构和代码会清晰很多

Try to use navigator experimental based navigation solution

NavigationExperimental based router and navigation methods can be driven by declarative way of changing the routes instead of directly accessing the navigation state by pushing and poping.

In short, solutions like react-native-router-flux and ex-navigation can simplify the navigation logic just like we use redux to simplify the application state.

Let's try to learn and understand these solutions and try to integrate them into this project.

运行react-native run-android的时候报错

  • What went wrong:
    A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
Could not find any matches for com.tencent.bugly:crashreport:latest.release as no versions of com.tencent.bugly:crashreport are available.
Required by:
reading:app:unspecified

find a native module error when writing tests

@Richard-Cao

cause: react-native-root-toasts does not compile es6 code to es5 when uploading to npm.

when: mocha test with babel-register, it will by default ignore any file that is located in node_modules, so the es6 files in react-native-root-toasts will cause test fail.

solution: configure babel to include react-native-root-toasts if you used it in your tests or ask the user to compile it to es5 as other npm modules.

I've opened an issue in the original repo: magicismight/react-native-root-toast#16

闪屏

你好,我想请问下,APP在加载完 IOS的 LaunchImage 之后 会闪一下白屏,然后再跳转到 Splash 页面,这个该怎么处理呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.