Code Monkey home page Code Monkey logo

counter-reredux's Introduction

counter-reredux

把redux最简单的demo改成比较复杂的形式。

最初的redux的counter的这个demo仅仅是提供了reducer,store,然后只用了一层组件,把store.dispatch给演示了一下,action是直接作为一句对象字面量存在的。

太简单了,虽然容易懂,但没法在实际项目上用,为了更好的理解redux的复杂应用,对原有demo进行改造,往实际项目上靠。 做的改造包括:

  • 把action给独立成一个文件(夹)
  • 创建根组件APP,在里面使用connect方法
  • 把原来的index改成Provider包围着APP的形式

counter-reredux's People

Contributors

limars874 avatar

Watchers

 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.