Giter Club home page Giter Club logo

react-native-ishiwupai's Introduction

iShiWuPai

如果你通过外链来到这个页面,本人要先表示感谢!项目其实很早就开始了,基本是自己学习React Native,并整合ReduxMobX的简单记录。正如你所见,项目并没有继续更新了,没有太多外因,权且理解为自己把重心稍微偏向了生活其他方面上。所以随着版本更新,项目是否能完美运行也是未知数,大家有兴趣可以按需查看源码。再次感谢各位的支持!感谢开源!

附:RNProjectPlayground 是刚开不久的仓库,主要是 MobXMST 相关,也加入了混编部分,处理的是导航这方面;接口数据是与本仓库一致的,有兴趣可以移步查看。里面的 demos 目录,是自己一些实践尝试,一般与项目无关。


iShiWuPai是基于React Native实现的展示型美食类APP。该分支针对原生新版食物派开发,数据来源于【薄荷】,主要针对MobX练习,不做商业用途。目前已适配iOS和Android两端,适合刚入门React Native的朋友学习。Enjoy it!🎉🎉🎉

运行截图

食物百科 逛吃 资讯详情 食物分类 我的

现有功能点

  1. 食物百科、食物列表、二维码扫描、逛吃、逛吃详情、我的和登录等界面的UI搭建
  2. 基于MobX实现状态栏颜色和数据管理
  3. 二维码扫描成功添加等待提示
  4. 网络状态检测高阶组件NetInfoDecorator的初级使用
  5. 逛吃顶部Tab标题切换时,添加scale和color动画

运行

$ git clone https://github.com/ljunb/react-native-iShiWuPai.git
$ cd react-native-iShiWuPai 
$ npm install
$ react-native run-ios/run-android

相关第三方库

  1. mobx
  2. mobx-react
  3. react-native-camera
  4. react-native-easy-toast
  5. react-native-scrollable-tab-view

react-native-ishiwupai's People

Contributors

bigloafer avatar ljunb 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

react-native-ishiwupai's Issues

versions error??

'ScrollView' has no proptype for native prop 'RCTScrollView.onrefReshStart' of native type 'BOOL'
if you haven't changed this prop yourself,this usually means that your versions of the native code and javescript code are out of sync. Updating both should make this error go away

Foods.js页面的一些疑惑

image
android机上运行到这个地方,点击“天然谷薯”时,ListView不显示相关数据(如图
image
),但通过react-devtools查看
image则显示数据已经在ListView中了;另外,再次点击下拉选项(
image
)中的全部时,onPress事件无法触发,望解答,谢谢!

请教关于redux的问题

export default connect((state) => {
const { Strolling } = state;
return {
Strolling
}
})(StrollingContainer);
这里用{ Strolling }析构state,为什么可以取到?并没有看到state里面有与之名字相同的参数

npm install error

[fsevents] Success: "/Users/zyd/lab/react-native-iShiWuPai/node_modules/react-native/node_modules/fbjs-scripts/node_modules/babel/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" is installed via remote
npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/zyd/.nvm/versions/node/v4.4.4/bin/node" "/Users/zyd/.nvm/versions/node/v4.4.4/bin/npm" "install"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants [email protected]
npm ERR! peerinvalid Peer [email protected] wants react@^0.14.0 || ^15.0.0-0
npm ERR! peerinvalid Peer [email protected] wants react@^0.14.0 || ^15.0.0-rc.1

npm ERR! Please include the following file with any support request:
npm ERR! /Users/zyd/lab/react-native-iShiWuPai/npm-debug.log

FoodEncyclopedia.js 问题请教

react native的初学者,没有系统的学习过,所以想请教一下这个页面中的一些疑惑 叨扰了

想请教一下这两行代码里的 searchAction跟foodHandleAction


在后面用的时候 一个是

另一个是
<HandleItem title="饮食分析"
imageName={require('../../resource/ic_home_analyse.png')}
onPress={() => handleAction('饮食分析')}
/>

一个是直接用了searchAction 另一个需要 () => handleAction('饮食分析')
这是为什么?谢谢啦

安装后报了个错

Native module RCTCameraModule tried to override RCTCameraModule for module name RCTCameramodule.If this was your intention,set sanOverrideExistingModule=true

我自己的Demo中refreshControl和react-native-scrollable-tab-view冲突

打扰了,我从你的app中学到不少,十分感谢!但是在我照着写Demo时我会遇到在‘’逛吃"页面,当下拉刷新时轻微的左右滑动会触发tabbar的切换,打断refreshcontrol,而您的app没有这个问题,运行设备都是一样的,我这个模块的结构几乎是照着抄的~还是不行 - -。。我想问一下你当初有没有遇到这种冲突。。。

启动就报错!

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ishiwupai/com.ishiwupai.MainActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2423)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2483)
at android.app.ActivityThread.access$900(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5438)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication
at com.facebook.react.ReactActivityDelegate.getReactNativeHost(ReactActivityDelegate.java:72)
at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:80)
at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:54)
at android.app.Activity.performCreate(Activity.java:6303)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2376)

看不见效果图也运行不起来

萌新求助,无法运行项目
复现
用webstorm打开项目后再终端运行
1.yarn
2.react-native run-android
3.报错
Looks like you installed react-native globally, maybe you meant react-native-cli?
To fix the issue, run:
npm uninstall -g react-native
npm install -g react-native-cli
4.npm uninstall -g react-native
5.npm uninstall -g react-native
6.react-native run-android
7.报错
Looks like you installed react-native globally, maybe you meant react-native-cli?
To fix the issue, run:
npm uninstall -g react-native
npm install -g react-native-cli

然后就一直循环执行命令
npm uninstall -g react-native
npm install -g react-native-cli
反复报错
Looks like you installed react-native globally, maybe you meant react-native-cli?
To fix the issue, run:
npm uninstall -g react-native
npm install -g react-native-cli

救救孩子吧。。。

出现的问题

本人刚学rn不久,看楼主的代码过程中
GlobalContants.js这个文件中全局变量的写法,在自己项目中做啦尝试,看楼主的项目运行没有问题,但是自己的项目在与运行的时候就会说不识别global.gScreen ,请问楼主是什么原因

root.js error

react-native 0.42

@NetInfoDecorator 会出错

怎么解决

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.