filp/react-native-es6-reflux

语言: Objective-C

git: https://github.com/filp/react-native-es6-reflux

使用React Native,ES6和Reflux进行iOS应用程序开发的Boilerplate
Boilerplate for iOS app development with React Native, ES6 and Reflux
README.md (中文)

反应原生,es6和回流样板

正如很长的回购标题所示,这是一个样板库 包括以下内容:

  • 使用Babel进行ES6到ES5的翻译
  • 使用Reflux的单向数据流架构

入门

  1. 克隆这个项目
  2. 安装依赖项: 贝壳 $ npm安装
  3. 启动webpack观察器(它构建React Native期望的index.ios.js文件)
  4. 在XCode中打开ReactNativeEs6Reflux.xcodeproj并运行项目 - 它应该如下所示:

Javascript文件结构

  - src/
    stores/ -  Reflux stores
      color_store.js - Example store implementation
    components/ - React components
      app.jsx - Top-level app component

    action.js - Reflux action definitions
    styles.js - StyleSheet definition(s)
    main.js   - Application bootstrap with react-native, transpiler entry-point

包含在示例中:

  • 一个简单的顶级App组件,带有示例样式(在src / styles.js中)
  • 使用TouchableOpacity的示例交互,以及示例Reflux操作(在src / actions.js中定义)
  • AppMessageStore Reflux存储示例,用于处理在点击React徽标时设置随机消息。

作者

这个样板由Filipe Dobreira创建。它包括自动生成的代码(通过react-native init)和Roman Liutikov的代码(即webpack配置)。

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

react-native, es6 & reflux boilerplate

As the very long repo title indicates, this is a boilerplate repository that
includes the following:

  • ES6-to-ES5 transpilation using Babel
  • Uni-directional data-flow architecture using Reflux

Getting started

  1. Clone this project
  2. Install dependencies:

    shell $ npm install

  3. Start the webpack watcher (it builds the index.ios.js file expected by React Native)

  4. Open ReactNativeEs6Reflux.xcodeproj in XCode and run the project - it should look like this:

Javascript file structure

  - src/
    stores/ -  Reflux stores
      color_store.js - Example store implementation
    components/ - React components
      app.jsx - Top-level app component

    action.js - Reflux action definitions
    styles.js - StyleSheet definition(s)
    main.js   - Application bootstrap with react-native, transpiler entry-point

Included in the example:

  • A simple top-level App component with example styles (in src/styles.js)
  • An example interaction using TouchableOpacity, and an example Reflux action (defined in src/actions.js)
  • An example AppMessageStore Reflux store, which handles setting the random message when the React logo is tapped.

Author

This boilerplate was created by Filipe Dobreira. It includes auto-generated code (through react-native init), and code by Roman Liutikov (namely the webpack configuration).