Support: Android 4.1 (API 16) + IOS (8.0+)
This is a React-Native written by the United States Mission client.
uses the React-Native 0.42 version. Follow ES6 syntax.
the main achievement of the United States of the four levels of the page (buy, near, orders, my), as well as part of the two page (buy details, Web pages). All
I try to make this Demo structure as close as possible to the actual project, while using a relatively simple way to achieve functionality. This will make it easier for people who have been exposed to ReactNative (like myself) to understand the code.
all JS code in the SRC directory.
generic tool class
all picture resources
generic UI control
network request interface
App main entrance, similar to the iOS in RootViewController
The project does not use Redux. Because personally feel that most of the small and medium App does not need Redux. If you blindly add Redux to the project, it does not bring too much benefit.
Lu Xun once said:
“If you don’t know if you need Redux, you don’t need it. “
Redux author Dan Abramov said:
“Only if you can’t solve a problem with React, you need Redux. “
Oh, another reason why I don’t use Redux, I don’t know how to use it.
App page Jump, TabBar, Navigation, all through the third party library react-native-router-flux. This is a very powerful library, you can achieve a lot of custom jump function.
App a lot of pages are using the same network interface, this is not to make the code more concise, just I lazy >.<
Third party dependence
- Clone the repo $clone https://github.com/huanxsd/MeiTuan.git $CD MeiTuan Git
- Install dependencies (NPM v3+) $NPM install
- Running on iOS $react-native run-ios
Could not to development connect server
Open a new terminal window and execute:
I have been writing Objective-C, but not long ago, I read the ES6 syntax and Flex layout, I immediately fell in love with this development.
this Demo took about 5 days to be my first ReactNative project.
if you have any comments or suggestions about this Demo, or like ReactNative friends, welcome to leave a message below. I will reply at the first time
If you like this Demo, please give me a star:
I will continue to update this Demo