GithubHelp home page GithubHelp logo

hhy5277 / meituan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jayden320/meituan

0.0 2.0 0.0 12.42 MB

MeiTuan App Write In latest React-Native(0.57.8)

License: MIT License

Python 2.84% Java 2.49% JavaScript 88.02% Objective-C 6.64%

meituan's Introduction

MeiTuan App Write In latest React-Native(0.57.8)

视频教程

现已推出全套视频教程,从创建工程讲起,一行一行编写代码,直至完成整个项目。

腾讯课堂

网易课堂

简书:http://www.jianshu.com/p/9211f42d5c25

screen shot for iOS

screen shot for Android

Setup

  1. Clone the repo
$ git clone https://github.com/huanxsd/MeiTuan.git
$ cd MeiTuan
  1. Install dependencies (npm v3+):
$ npm install
  1. Running on iOS:
$ react-native run-ios

Troubleshooting

Could not connect to development server

In a separate terminal window run:

$ react-native start

Dependency

Contact

If you have any suggestions, leave a message here 简书

At last

If you like this project, please give me a star :)

高仿美团客户端 React-Native版(0.57.8)

简介

这是一个用React-Native写的美团客户端。

使用了React-Native 0.57.8版本。遵循ES6语法。

主要实现了美团的四个一级页面(团购、附近、订单、我的),以及部分二级页面(团购详情、Web页面)。

所有功能都是用JavaScript写的,iOS和Android的代码复用率达到了97%(别问我这个数字怎么来的,我瞎掰的)。

这个Demo的静态类型检查工具使用了Facebook的Flow。它让我写JavaScript的时候,更有安全感。个人觉得可以用两个字形容这个工具,那就是:灰常牛逼!

我试着让这个Demo的结构尽量接近实际项目,同时使用比较简单方式去实现功能。这样可以让刚接触ReactNative的人(比如我自己...)更够容易理解代码。

该项目没有使用Redux。因为个人觉得目前大部分的中小型App并不需要Redux。如果盲目的将Redux添加到项目中,并不能带来太多的益处。

鲁迅曾说过:

"如果你不知道是否需要 Redux,那就是不需要它。"

Redux的作者 Dan Abramov 说过:

"只有遇到 React 实在解决不了的问题,你才需要 Redux 。"

哦,另外一个没有用Redux的原因,是我还不太会用。

App的页面跳转、TabBar、Navigation,全部通过react-navigation实现。这是一个非常牛逼的库,可以实现很多自定义的跳转功能。最早是通过react-native-router-flux实现跳转。在遇见react-navigation后,我果断放弃了react-native-router-flux。

App中很多页面都使用了同一个网络接口,这不是为了让代码更加简洁,仅仅是我偷懒 >.<

第三方依赖

安装

  1. Clone the repo
$ git clone https://github.com/huanxsd/MeiTuan.git
$ cd MeiTuan
  1. Install dependencies (npm v3+)
$ npm install
  1. Running on iOS
$ react-native run-ios

常见问题

Could not connect to development server

打开新的terminal窗口,并执行:

$ react-native start

瞎扯蛋

我之前一直在写Objective-C,但不久前看了ES6的语法和Flex布局方式后,我便马上爱上了这种开发方式。

这个Demo花了大概5天时间,是我的第一个ReactNative项目。

如果对这个Demo有任何的意见或建议,或者喜欢ReactNative的朋友,欢迎在下方留言。我会在第一时间回复 :)

另外,不要问我为什么英文说明那么点,中文说明这么多。怪英语老师咯

最后

如果你喜欢这个Demo,请给我一个star :)

Github:https://github.com/huanxsd/MeiTuan

我将持续更新这个Demo

如果对这个Demo有任何疑问,欢迎加入我们的大家庭

ReactNative开发者群二维码.png

meituan's People

Contributors

bavuongco10 avatar jayden320 avatar lundao avatar

Watchers

 avatar  avatar

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.