GithubHelp home page GithubHelp logo

goreact's Introduction

GoReact

  • GoReact

  • 基于webpack + react + react-router-redux + redux + redux-immutablejs + react-css-modules + postcss + ES6, 适用于SPA的前端脚手架

  • 推荐使用

    • axios作为HTTP客户端
    • redux-form
    • redux-thunk(让action支持异步)

下载

 git clone https://github.com/jiaolongHuang/GoReact
 cd GoReact
 npm install (安装依赖模块)
 npm install webpack webpack-dev-server -g (没有安装webpack, webpack-dev-server的需要安装)

运行

  • 开发模式:
npm run dev
open http://127.0.0.1:8368
  • 发布生产版本
npm run build

文件命名规范

文件夹 文件名 作用 webpack处理后的alias名
actions 全部小写,如first.jsx xxAction
components 首字母大写,如Header.jsx 原子组件 不处理
componentsPage 首字母大写,如AppList.jsx 由多个子组件组成的组件 不处理
config 全部小写,如first.jsx route.jsx, store.jsx 不处理
constants 首字母大写,如ActionTypes.jsx 常量存放 ActionTypes.jsx -> ActionType
containers 功能+Container, 如HomeContainer.jsx 一个页面 不处理
helpers 全部小写,如api.jsx 接口,公用函数 xxHelper
reducers 全部小写,如first.jsx xxReducer
style 不需要被css-modules处理的css文件,通常是全局样式 不处理

goreact's People

Watchers

 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.