Git Product home page Git Product logo

react-redux-async's Introduction

react-redux-async

这是自己学习使用React+React-redux搭建的一个小demo,实现了一个简单的todo列表和基本的删除还原操作,以及做了一个简单的路由跳转实验,主要是让自己了解react-redux怎么跟react结合在一起,将整体的状态放在state中。

后续

本项目后续逐渐添加自己学习D3的各种demo,目前有柱状图、饼图、环状图、力向导图、树状图等。

项目安装

npm install
yarn start

打开http://localhost:3000查看项目.

知识点

  • connectcontainer容器中的数据|方法通过props传递到ui容器
  • Provider 将全局的store传递给各层次组件中,利用Reactcontext
  • combineReducers(reducers) 合并项目中的reducers,生成一个集合reducercombineReducers本身是一个higher-order reducer
  • createStore(rootReducer, initiateState, enhance) 生成全局唯一的一个store�
  • middleWare 扩展store功能的中间件,比如让action返回一个函数(可以异步请求数据),进行dispatch的监控等
  • injectReducers 也是一个higher-order reducer ,可主要是在项目中可以动态注入reducer
  • compose 用于多个函数从左到右的组合,最后合成一个函数,用于createStore�中的enhance中。 可以将applyMiddlewareredux-extension合并起来

学习来源

React-redux中文文档 React文档 React-router(react-router已经是4.0了) React-router4.0教程

react-redux-async's People

Contributors

jhuanglin avatar

Watchers

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