Coder Social home page Coder Social logo

meooxx's Introduction

ReactSPABuild Status

开始

#  git clone https://github.com/meooxx/ReactSPA.git
#  cd ReactSPA  
#  yarn install
#  yarn start 

!!注意

请一定使用 yarn 因为yarn install时候优先从本地已经下载的包,复制过来。更重要的是,解决了各个包之间的依赖。

1-22(2018 ) 整理总结

js 文件 命名真坑爹, 我当时为什么干了这种蠢事, 组件大小写 全乱了,花了好长时间整理。

技术栈

  • 框架: React & React-dom
  • UI组件: AntD
  • 路由: React-Router-dom & Hash History
  • 状态管理: Redux
  • Js: Es6
  • sytle: PostCss
  • 检查: eslint
  • 抓取数据: Fetch
  • 打包构建: Bable, webpack
  • 包管理工具: Npm yarn

优势

  • 支持Es6
  • React-Router v4
  • PostCss Browserlist 兼容查询 > 5%
  • 支持浏览器自动刷新
  • 用Redux管理状态流

? 一点疑问

(3月)补充说明: 在modal 框中的这种玩法, 通过props 这种方式应该是解决不了的

~~用redux管理数据流的过程中, 难免会用到异步。这里用的是cnode的api, 问的是:比如说当通过post accesstoken获取用户信息的时候,有个 login按钮,当点击按钮的时候回发起异步的action, 我想通过这个返回的信息作出一些判断, 失败成功之类的. 但下面的代码又是同步的. 比异步抓取动作快一点. 导致没有获得返回数据之前就会执行, 会出现些错误. 实在想不到解决的方法,用了另外一种不优雅的替代方法, 尴尬. 用redux管理数据流的过程中, 难免会用到异步。这里用的是cnode的api, 问的是:比如说当通过post accesstoken获取用户信息的时候,有个 login按钮,当点击按钮的时候回发起异步的action, 我想通过这个返回的信息作出一些判断, 失败成功之类的. 但下面的代码又是同步的. 比异步抓取动作快一点. 导致没有获得返回数据之前就会执行, 会出现些错误. 实在想不到解决的方法,用了另外一种不优雅的替代方法, 尴尬. ~~

end

  • 如果你能提出一些批评或者建议 非常感谢!

meooxx's People

Contributors

traviscibot avatar

Watchers

James Cloos 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.