GithubHelp home page GithubHelp logo

react's Introduction

react-demo

Usage

  • 开发
$ npm install -g
$ npm start
  • 打包
$ npm run build

技术点

  • 本框架使用react react-router redux webpack less ant-design等技术

功能

  • 可快速开发后台类系统
  • webpack生成首页
  • 热更新
  • 路由分割
  • 报错信息指向源文件

开发步骤

  1. 在src/containers 文件下添加页面
  2. 在src/router.js 文件里添加路由
  3. 在src/actions 文件下添加页面对应的.js 文件(主要作用是发起dispatch,改变redux)
  4. 在src/reducers 文件下添加页面对应的.js 文件(设置redux初始值,并根据不同情况进行相应改变)
  5. 在src/reducers/index.js 文件将现有的reduces合并为一个大的状态机

待改进问题

  • 打包代码压缩
  • webpack添加环境变量,为快发环境和线上环境定制深度定制不同打包逻辑
  • 登录页面加入打包,不单独列出
  • 与后端进行接口标准制定,并统一改进接口反馈(包括成功提示,失败提示,404处理,错误处理等)

将来设想

  • 构建自己的node.js服务器
  • 进行服务器端渲染

react's People

Contributors

liyuanqing avatar

Stargazers

 avatar 李江鹏 avatar  avatar  avatar  avatar yooma avatar Sandra_zxf avatar Mr.mshao avatar  avatar Cheng Zhixuan avatar  avatar  avatar

Watchers

James Cloos avatar  avatar panghaoyuan avatar

Forkers

yaobowen2

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.